Proposal: Add (&) to Data.Function

Andreas Abel andreas.abel at
Tue Nov 20 19:58:24 CET 2012

On 20.11.2012 19:46, John Wiegley wrote:
>>>>>> Edward Kmett <ekmett at> writes:
>> We had switched to % from (|>) to be consistent with the other (+=) (*=)
>> operators where (%=) was being read as 'mod-equals' as a bit of a pun, and
>> could be seen as the application of the % operator to the target.
> Yes, a strong positive in favor of & of |> is that it allows the lens library
> to offer the highly useful variants &= and &~, which have obvious (and
> related) meanings

Well, the obvious meaning of &= is bitwise-and-with, like in

   x &= 0xff7f;

isn't it? ;-)

> to someone using lens.  |>= and |>~ would get a bit awkward
> in comparison.

The symbol |> combines the pipe | with an arrow > indicating the 
direction of information flow.  And it is used in ML already.  Hard to 

Andreas Abel  <><      Du bist der geliebte Mensch.

Theoretical Computer Science, University of Munich
Oettingenstr. 67, D-80538 Munich, GERMANY

andreas.abel at

More information about the Libraries mailing list