[Haskell-cafe] Syntax proposal for "reverse apply"/"pipeline apply" (flip ($))

Alexey Muranov alexey.muranov at gmail.com
Fri Apr 18 08:13:33 UTC 2014


On 17 avr. 2014, at 22:24, Edward Kmett <ekmett at gmail.com> wrote:

> * (|) is already stolen for syntax, so the pairing, while a powerful mnemonic, can't be used at all here.
> 
> * (#) collides with the use of (#) in MagicHash, so you get uncomfortable cases where you need to throw in a space.
> 
> * (&) can be read off as "and then". (#) has no such obvious reading and is just more line noise someone has to learn.
> 

Thanks for the explanation.  Maybe some Wiki page with a list of syntax and fixity proposals, explanations, comments, and votes could be made for this?

One more idea: how about '>-' for 'flip ($)' and '-<' for '$', by analogy with '>>=' and '=<<'?

    y = 3 >- \x -> x * x                -- y == 9

Alexey.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20140418/2d55d199/attachment.html>


More information about the Haskell-Cafe mailing list