On 16/11/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
And if we are absolutely positive that the value is (Just x),
we can always write
        maybe (assert False undefined) id v

It should be pointed out that Data.Maybe does export a less well-known
function, fromMaybe:

fromMaybe z = maybe z id

This can be used to make the 'maybe X id' case a bit tidier (although
technically it's not a save on characters).

--
-David House, [EMAIL PROTECTED]
_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to