[Haskell-cafe] Re: [Haskell] [newbye] 'Just a'

Yuri D'Elia wavexx at yuv.info
Mon Feb 7 10:57:08 EST 2005


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.



More information about the Haskell-Cafe mailing list