<RayNbow> hmm... I was wondering... [] is an instance of the Monad class... would it be useful to make other collection types (for example, Data.Set) also an instance of the Monad class?
<Cale> RayNbow: If it were possible, Set would be an instance of Monad
<Cale> RayNbow: The problem is that in order to implement bind and/or return, you need an instance of Ord for your element type, which isn't guaranteed by either of those.
<Cale> :t (>>=)
<lambdabot> forall (m :: * -> *) a b. (Monad m) => m a -> (a -> m b) -> m b
<RayNbow> why would you need Ord?
<Cale> (nothing here says that a or b will have an instance of Ord)
<Cale> Because in order to build a Data.Set, which is really a binary tree structure, you need to have an ordering on the elements. That's how it gets its efficiency.