
24 Apr
2014
24 Apr
'14
12:29 a.m.
On 18/04/2014, at 1:11 AM, Alexey Muranov wrote:
I do not know F#, and maybe i am missing something, but assuming that
x |> f |> g == (x |> f) |> g
and
g <| f <| x == g <| (f <| x)
what are
x |> f <| y
This is the same as (f x) y. Determined by experiment: let h x y = (x,y) ;; 1 |> h <| 2 ;; => val it : int * int = (1, 2) (f y) x would give the answer (2, 1).
g <| x |> f
This is f (g x). Determined by experiment: let f x = x * 2 ;; let g x = x + 1 ;; g <| 1 |> f ;; => val it : int = 4 g (f 1) would give the answer 3.