[Haskell-cafe] Views

Johannes Waldmann waldmann at imn.htwk-leipzig.de
Sat Sep 13 14:42:35 EDT 2008

> 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


(*) 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...

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 257 bytes
Desc: OpenPGP digital signature
Url : http://www.haskell.org/pipermail/haskell-cafe/attachments/20080913/af3192f6/signature.bin

More information about the Haskell-Cafe mailing list