Flipped function application

Artyom Kazak yom
Thu Oct 10 17:36:55 UTC 2013


I hope it does sneak into Prelude, if at all. Having to import a module  
just for (#) is already going to make it rarely used, but allowing name  
clashes (since most library authors only care about compatibility with  
Prelude) would make the matters even worse.

<carter.schonwald at gmail.com> wrote:

> as long as the operator doesn't sneak into  prelude (and thus consuming  
> namespace for everyone), i don't really care >what its called (or if we  
> get it.)
>
>
>
>
> On Thu, Oct 10, 2013 at 1:23 PM, Simon Peyton-Jones  
> <simonpj at microsoft.com> wrote:
>>
>>
>> I quite like that.  ($$), that is.  Better than (&)
>>
>>
>>
>> Simon
>>
>>
>>
>> | -----Original Message-----
>>
>> | From: Libraries [mailto:libraries-bounces at haskell.org] On Behalf Of
>>
>> | Twan van Laarhoven
>>
>> | Sent: 10 October 2013 18:20
>>
>> | To: libraries at haskell.org
>>
>> | Subject: Re: Flipped function application
>>
>> |
>>
>> | On 10/10/13 16:16, David Menendez wrote:
>>
>> | > we don't need new name suggestions at this point, but:
>>
>> | >
>>
>> | > Consider <**> :: f a -> f (a -> b) -> f b.
>>
>> | >
>>
>> | > That suggests <$$> :: f a -> (a -> b) -> f b by analogy, so maybe $$
>>
>> | :: a -> (a
>>
>> | > -> b) -> b? This avoids the downsides of & while maybe being less
>>
>> | ugly to
>>
>> | > combine with things than |>. Also, it looks like $, suggesting
>>
>> | they're related.
>>
>> | >
>>
>> |
>>
>> | As a data point: I have in fact used <$$> as (flip fmap) before, with
>>
>> | this exact
>>
>> | reasoning.
>>
>> |
>>
>> |
>>
>> |
>>
>> | Twan




More information about the Libraries mailing list