apfelmus wrote:
Note that due to parametricity, any function of this type is necessarily
either id or _|_. In other words, there are only two functions of type

  ∀a∀b. (a->b) -> (a->b)


You managed to type ∀  but you couldn't find ⊥ ?

OOC, can anybody tell me what ∀ actually means anyway?

That's because the functions has to work for all types a and b in the
same way, i.e. it may not even inspect how the given types a or b look
like. You need type classes to get a reasonable type for the function
you want

  memoize :: Memoizable a => (a->b) -> (a->b)


Ah... most optimal!

_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to