let f = fun n -> n * n let squares = [2; 4; 6; 8] |> List.map f // val squares : int list = [4; 16; 36; 64]