Proposal: Add (&) to Data.Function
nominolo at googlemail.com
Tue Nov 20 20:48:32 CET 2012
On 20 November 2012 18:52, Edward Kmett <ekmett at gmail.com> wrote:
>>>> ("hello","world") & _1.traverse %~ toUpper & _2 .~ 42
> could be written
> _2 .~ 42 $ _1.traverse .~ toUpper $ ("hello","world")
Surely, you must be joking. That's some butt-ugly piece of code.
Let's not try to turn Haskell into J or Perl.
Personally, I like neither (&) nor (|>). The latter is used in
OCaml/F# but looks quite ugly (I know rendering it as a latex triangle
would look pretty nice, but we can't rely on everyone having that
option). Regarding, (&) I agree that it looks a bit like bitwise or,
but I suspect that is something that people can get used to quite
quickly. I agree with Johan that "works well with
<some-non-platform-library>" should not be a criterion.
+0.2 for (&), and +0.1 for (|>)
More information about the Libraries