[Haskell-cafe] Implementing Mathematica

Stefan Holdermans stefan at cs.uu.nl
Thu May 31 01:03:13 EDT 2007


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


More information about the Haskell-Cafe mailing list