If you want something even simpler:
asum [Nothing, Just True, Nothing, Just False]
From Data.Foldable :)
_______________________________________________discovered this handy snippet today (duh :):>>> foldl (<|>) Nothing [Nothing, Just 1, Nothing, Just 2]Just 1basically, pick first Just from a list of Maybeshttp://hackage.haskell.org/package/base-4.9.0.0/docs/Control-Applicative.html#g:2
Beginners mailing list
Beginners@haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners