Hi, Am Montag, den 22.12.2008, 09:24 -0500 schrieb Jeff Heard: > Provides useful anaphoric and monadic versions of if-else and when, as > well as infix operators for the actions to allow things like this:
nice package. Especially awhen :: Monad m => Maybe a -> (a -> m ()) -> m () is something I define in almost every project. Note that the documentation: ========== Chainable anaphoric when. Takes a maybe value. if the value is Just x then execute action x , then return True . otherwise return False . ========== does not match the implementation. And looking at the code, you could, you want, build your more special functions upon your more general ones, e.g.: awhen mb action = aif mb action (return ()) Greetings, Joachim -- Joachim "nomeata" Breitner mail: m...@joachim-breitner.de | ICQ# 74513189 | GPG-Key: 4743206C JID: nome...@joachim-breitner.de | http://www.joachim-breitner.de/ Debian Developer: nome...@debian.org
signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe