[Haskell-cafe] Why is this strict in its arguments?
Yitzchak Gale
gale at sefer.org
Thu Dec 6 06:35:46 EST 2007
Jules Bean wrote:
> I think the 'right' answer for this case is to drop the maybes and just
> use lists, which is what the OP himself realised.
Yes, part of the fun of programming is when
you realize that you have been re-implementing the
right data type inside of a wrong one.
Alistair Bayley wrote:
>> (BTW, this has probably come up before, but wouldn't it be a little
>> bit nicer if "when" returned mzero rather than () in the "do nothing"
>> case?)
No. We already have both of those:
when pred action
guard pred >> action
-Yitz
More information about the Haskell-Cafe
mailing list