Adding (??) into Data.Functor
Edward Kmett
ekmett at gmail.com
Mon Feb 17 16:15:34 UTC 2014
I am also -1 on adding it to Data.Functor despite having written it for
lens.
On Mon, Feb 17, 2014 at 3:41 AM, Andreas Abel <abela at chalmers.se> wrote:
> I am a -1 on both proposals, i.e., on having a special map for the "apply
> to a fixed argument" case.
>
>
> On 16.02.2014 21:42, Nikita Volkov wrote:
>
>> Also, since the variable input of this combinator seems to be on the
>> functor side I suggest to inverse the arguments order order, i.e.:
>>
>> mapf :: a -> f (a -> b) -> f b
>>
>> This way it'll target composition. And since it's a combinator over
>> functions it's a pretty important thing. E.g.:
>> mapf 2 . map (*) $ [1..10]
>>
>
> I'd simply write
>
> map (2 *) [1..10]
>
> Cheers,
> Andreas
>
> --
> Andreas Abel <>< Du bist der geliebte Mensch.
>
> Depeartment of Computer Science and Engineering
> Chalmers and Gothenburg University, Sweden
>
> andreas.abel at gu.se
> http://www2.tcs.ifi.lmu.de/~abel/
> _______________________________________________
> Libraries mailing list
> Libraries at haskell.org
> http://www.haskell.org/mailman/listinfo/libraries
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/libraries/attachments/20140217/1ee3e3ca/attachment.html>
More information about the Libraries
mailing list