|dmead||but not so dumbed down|
|jcreigh||it's seems silly that map isn't (Functor f) => (a -> b) -> f a -> f b; what's the point of a rich type system if you don't use it?|
isn't map just for lists?
dmwit: I mean, yes, the map in prelude is.
Data.Map is different?
|nmessenger||jcreigh is speaking of Functor's fmap|
|jcreigh||dmwit: Data.Map is "Map" (ie, associative array)|
yeah, basically, I don't see why map shouldn't be fmap to begin with
|nmessenger||@type Data.Map.map -- unrelated|
|lambdabot||forall a b k. (a -> b) -> Data.Map.Map k a -> Data.Map.Map k b|
|nmessenger||wait, no, that's fmap isn't it? :)|
|jcreigh||(I know H98 thought polymorphism was confusing; I think arbitrary warts are confusing.)|
|sorear||@remember jcreigh it seems silly that map isn't (Functor f) => (a -> b) -> f a -> f b; what's the point of a rich type system if you don't use it?|
|nmessenger||jcreigh: perhaps there should be a BeginnersPrelude with more monomorphism that newbies start out with?|
|sorear||@google Stefan O'Rear video game|
|dmead||nmessenger: it's called hugs maybe?|
|nmessenger||and really, the case of map/fmap is just naming. Not that bad|
|jcreigh||nmessenger: maybe. I don't know what the best solution would be. I think Haskell tutorials/books aimed at newbies could hand-wave. ie, "map has type (a -> b) -> [a] -> [b]", with a footnote to the effect that it's more general than that, but don't worry your pretty little head about that just yet.|
|sorear||@google Stefan O'Rear videogame industry|
Title: Nabble - Where prelude alternatives/ classes and types to get values?
|nmessenger||map f (newbieMeantItToBeAList :: NotAList) -- what?!! What the hell does "NotAList not an instance of Functor mean?!!?!"|
|lambdabot||map _  = |
map f (x:xs) = f x : map f xs
|dmead||looks like a list to me =/|
|jcreigh||nmessenger: it confused me at first. for a while, I thought fmap was somehow different than map. It took me some time to realize that they were the same.|
|Saizan||i think newbie should learn polymorphism and typeclasses from the very start.|
|jcreigh||dmwit: he means of "map" really was fmap|
|nmessenger||dmead: my comment was in the context of a polymorphic map|