If the pipe operator is created like this:
let (|>) f g = g f
And used like this:
let result = [2;4;6] |> List.map (fun x
If you enter your definition of |>
into fsi and look at the operator's signature derived by type inference you'll notice val ( |> ) : 'a -> ('a -> 'b) -> 'b
, i.e. argument 'a
being given to function ('a -> 'b)
yields 'b
.
Now project this signature onto your expression [2;4;6] |> List.map (fun x -> x * x * x)
and you'll get List.map (fun x -> x * x * x) [2;4;6]
, where the argument is list [2;4;6]
and the function is partially applied function of one argument List.map (fun x -> x * x * x)
.