[Haskell-cafe] Syntax proposal for "reverse apply"/"pipeline apply" (flip ($))
Hans Höglund
hans at hanshoglund.se
Thu Apr 17 19:32:28 UTC 2014
> Can we argue about the fixity for (<&>)? I've always it as infixl 4, to mix it in with other applicative operators, e.g.:
>
> (:) <$> fx <*> fl
>
> becomes
>
> fx <&> (:) <*> fl
I agree, this seems to be a mistake in lens.
> Last I checked,
>
> (&) = flip ($)
>
> is both shorter to type, and more explicit than:
>
> import Control.Apply.Reverse
>
> - Clark
>
Well the purpose here is to propose a standard name and fixity, not to save keystrokes.
When a lot of libraries start to define a (trivial) thing under different names, that to me is a good indication that it should be in the standard library. It is a matter of keeping the signal-to-noise ratio large, which greatly helps when reading unfamiliar code.
Hans
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20140417/902dca00/attachment.html>
More information about the Haskell-Cafe
mailing list