Adding (??) into Data.Functor
Daniil Frumin
difrumin at gmail.com
Mon Feb 17 16:29:30 UTC 2014
On Mon, Feb 17, 2014 at 8:21 PM, Twan van Laarhoven <twanvl at gmail.com> wrote:
> Would (<$$>) be a sensible name? To match (<**>) from Control.Applicative
>
> (<$$>) :: Functor f => a -> f (a -> b) -> f b
>
> I don't really feel the need for such a function, though.
>
>
> On a related note, the documentation for (<**>) is pretty bad. It says "A
> variant of <*> with the arguments reversed." but that doesn't make it clear
> that the function is different from `flip (<*>)`.
>
Is the current definition not equivalent to `flip (<*>)` though?
>
> Twan
>
>
> On 16/02/14 19:51, Dimitri Sabadie wrote:
>>
>> Hi all,
>>
>> I often come up using this snippet:
>> map ($ a) l
>> with
>> l :: [a -> b]
>>
>> In Control.Lens, there's a nice combinator for that, (??) :
>>
>> l ?? a
>>
>> I think it'd be great to include that in Data.Functor, because it's a very
>> common use case.
>>
>>
>> _______________________________________________
>> Libraries mailing list
>> Libraries at haskell.org
>> http://www.haskell.org/mailman/listinfo/libraries
>>
>
> _______________________________________________
> Libraries mailing list
> Libraries at haskell.org
> http://www.haskell.org/mailman/listinfo/libraries
--
Sincerely yours,
-- Daniil
More information about the Libraries
mailing list