[Haskell-cafe] Re: Re-order type (flip map)
wren ng thornton
wren at freegeek.org
Sun Oct 10 20:11:23 EDT 2010
On 10/10/10 7:00 PM, Johannes Waldmann wrote:
>> My point was: you need to find/define two operators, not just one.
> Sure, I need flip ($) and flip (.)
> Since the Prelude forgot to define these (and flip map),
> the question was: are there established names for these two operators?
I don't know how established it is, but ($>) is a common name for
flip($). Common, as in, I've seen three or so different people use it.
IIRC, the F# name is (|>) but triangles are far too nice of a name and
are often used for other things (e.g., cons and snoc). For what it's
worth, this is the T combinator--- in case thrushes give you any ideas
for names. Personally I'm more likely to use T as a prefix combinator
rather than as infix, and for that the ($ _) section is good enough for me.
As for flip(.) we have (>>>) in Control.Arrow.
More information about the Haskell-Cafe