
16 Apr
2014
16 Apr
'14
11:38 p.m.
On 17/04/2014, at 10:25 AM, Alexey Muranov wrote:
For whatever it is worth, i would like to propose for discussion a syntax for "(flip ($))" operation in Haskell.
Oh, you mean like F#'s "|>" operator?
(|>);; val it : ('a -> ('a -> 'b) -> 'b) = fun:it@2 (<|);; val it : (('a -> 'b) -> 'a -> 'b) = fun:it@3-1
I think that a good syntax would be "|^", for example:
If we were to copy an operator from F#, it would have been nice to copy the F# name for it. Sadly, Data.Sequence already uses |> . Hoogle doesn't find a (|^), so that might work. I will say, however, that whenever I've read chunks of F# with long chains of |> operators, I've wanted to rewrite them using point-free style.