> a) ... to use Maybe
> b) ... to provide my own Data.Heap.View type

leave the choice up to the programmer,
and provide a generic interface,
accepting any MonadZero (*) instance.

cf. Data.Set.maxView

http://www.haskell.org/hoogle/?hoogle=maxView

(*) ah - I forgot, MonadZero didn't quite make it,
instead we have "fail" in Monad, and "mzero" in MonadPlus.
Sure there must have been a reason for this...


Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to