On Sun, Mar 25, 2007 at 12:59:26AM -0400, [EMAIL PROTECTED] wrote:
> G'day all.
> 
> Quoting Jason Creighton <[EMAIL PROTECTED]>:
> 
> > Wouldn't this be a non-issue if the "map" in Prelude was fmap?
> 
> It would be a non-issue if a number of things were different, such
> as if Data.Map were a Functor and "map" was the Functor map instead
> of the list map.

Data.Map is a Functor:

http://haskell.org/ghc/docs/latest/html/libraries/base/Data-Map.html#t%3AMap

~$ ghci
   ___         ___ _
  / _ \ /\  /\/ __(_)
 / /_\// /_/ / /  | |      GHC Interactive, version 6.6, for Haskell 98.
/ /_\\/ __  / /___| |      http://www.haskell.org/ghc/
\____/\/ /_/\____/|_|      Type :? for help.

Loading package base ... linking ... done.
Prelude> :m + Data.Map
Prelude Data.Map> fmap (*2) (fromList [(1,2), (3,4)])
fromList [(1,4),(3,8)]

...but perhaps it's not a Functor in some earlier version of the
library?

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

Reply via email to