Proposal: Num instance for (a -> b)
Dannyu NDos
ndospark320 at gmail.com
Sun Nov 11 04:55:17 UTC 2018
I'm +1 on this, since it is conventional to write addition (and others)
over function as such in most math textbooks.
2018년 11월 11일 (일) 13:48에 Daniel Cartwright <chessai1996 at gmail.com>님이 작성:
> relevant reddit comment thread:
> https://www.reddit.com/r/haskell/comments/9vtis5/the_universe_of_discourse_i_hate_the_environment/e9f1lea?utm_source=reddit-android
>
> instance Num b => Num (a -> b) where
> f + g = \x -> f x + g x
> f * g = \x -> f x * g x
> f - g = \x -> f x - g x
> negate f = \x -> negate (f x)
> abs f = \x -> abs (f x)
> signum f = \x -> signum (f x)
> fromInteger i = \x -> fromInteger (f x)
> _______________________________________________
> 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/20181111/ce8e945b/attachment.html>
More information about the Libraries
mailing list