Proposal: add `on` to the Prelude
Ryan Trinkle
ryan.trinkle at gmail.com
Tue Sep 10 22:42:31 UTC 2019
One note: this does conflict with some other libraries, for instance GTK2HS
On Tue, Sep 10, 2019 at 6:26 PM chessai . <chessai1996 at gmail.com> wrote:
> +1
>
> On Tue, Sep 10, 2019, 5:53 PM David Feuer <david.feuer at gmail.com> wrote:
>
>> Every time I reach for Data.Function.on, I feel like a total dolt for
>> having to import a module to get a function whose implementation is barely
>> longer than the import. And it's a really good function too! Can we please
>> add it to the Prelude?
>>
>> on :: (b -> b -> c) -> (a -> b) -> a -> a -> c
>> (.*.) `on` f = \x y -> f x .*. f y
>> _______________________________________________
>> Libraries mailing list
>> Libraries at haskell.org
>> http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries
>>
> _______________________________________________
> Libraries mailing list
> Libraries at haskell.org
> http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/libraries/attachments/20190910/d6ecb7e4/attachment.html>
More information about the Libraries
mailing list