
On Mon, 07 Feb 2005 15:08:56 +0000, Graham Klyne wrote:
[I've switched my response to the Haskell-cafe list]
I'm following all lists through gmane, hoping the post will work. I've received a double-ack first from gmane and then from the mailing-list manager.
What do you intend if both (get a) and (get b) return Nothing?
In a proper function I'd specify a default value, I guess. My intent was to explicitly remove the Maybe type from the data (no real applications here).
You might also be interested in the library function 'maybe': http://www.haskell.org/onlinereport/standard-prelude.html#$vmaybe
or maybe (sic) Maybe.fromMaybe in: http://www.haskell.org/onlinereport/maybe.html
Using one of these, I think your function could reasonably be expressed as a simple one-liner.
Thanks for the tips everyone.