
6 Dec
2007
6 Dec
'07
6:35 a.m.
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