I assume there is a standard name for this class/function:

  instance Foo [] where
    foo [] = mzero
    foo (x:_) = return x

  instance Foo (Maybe x) where
    foo Nothing = mzero
    foo Just x = return x


-Alex-





______________________________________________________________
S. Alexander Jacobson tel:917-770-6565 http://alexjacobson.com
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to