
Thanks all, Now that I have a (very) rudimentary understanding of Haskell, I figured I'd back up and have a closer (conceptual) look at type definitions to see what they have in common, and just happen to pick Maybe and List. I also noticed Maybe has a list of "Instances" Monad Maybe Functor Maybe Typeable1 Maybe MonadFix Maybe MonadPlus Maybe etc. while List has none, at least I don't see any in Data.List. Same reason?
From "Learn You A Haskell:"
"If a type is a part of a typeclass, that means it supports and implements the behavior the typeclass describes."
I'm way out on a limb here, but isn't Monad a typeclass? and if, as we say above, that Maybe is an instance of Monad, wouldn't there have to be
instance Monad Maybe where
return = ... -- return for Maybe
>>= = ... -- bind for Maybe
etc.
somewhere? Where? It's not in Data.Maybe. Is there some kind of scheme for defining this stuff, i.e., this goes here, that goes there?
Michael
--- On Fri, 7/30/10, Edward Z. Yang
Const x xs is x:xs (constructor)
That should be a Cons, not Const. :o) Cheers, Edward