[Haskell-cafe] Intuitive function given type signature

Ivan Miljenovic ivan.miljenovic at gmail.com
Wed May 19 00:35:34 EDT 2010


This looks suspiciously like homework...

2010/5/19 R J <rj248842 at hotmail.com>:
> What are some simple functions that would naturally have the following type
> signatures:
> f :: (Integer -> Integer) -> Integer

I can only think of one solution to this but it doesn't guarantee that
it returns a value...

> g :: (Integer -> Integer) -> (Integer -> Integer)

Infinite possible functions.  Don't forget, this is equivalent to:

g :: (Integer -> Integer) -> Integer -> Integer


-- 
Ivan Lazar Miljenovic
Ivan.Miljenovic at gmail.com
IvanMiljenovic.wordpress.com


More information about the Haskell-Cafe mailing list