[Haskell-cafe] Are there arithmetic composition of functions?
Chris Smith
cdsmith at gmail.com
Mon Mar 19 18:58:48 CET 2012
On Mar 19, 2012 11:40 AM, "Ozgur Akgun" <ozgurakgun at gmail.com> wrote:
> {-# LANGUAGE FlexibleInstances #-}
>
> instance Num a => Num (a -> a) where
You don't want (a -> a) there. You want (b -> a). There is nothing about
this that requires functions to come from a numeric type, much less the
same one.
--
Chris Smith
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20120319/ccdb5ad8/attachment.htm>
More information about the Haskell-Cafe
mailing list