
31 May
2007
31 May
'07
5:03 a.m.
Jon,
However, I can't think how you might return physically identical results when possible in Haskell. Essentially, you need a higher-order map function:
val id_map : ('a -> 'a) -> 'a t -> 'a t
that returns its input when "f x = x" for every x. How might this be done?
fmap :: (Functor f) => (a -> b) -> f a -> f b Cheers, Stefan