On Feb 6, 2008 10:04 AM, Luke Palmer <lrpalmer at gmail.com> wrote: > How about: > > inv m = do > success <- (m >> return True) `mplus` return False > if success then mzero else return () Prelude Control.Monad> inv [] [()] Prelude Control.Monad> inv [10] [()] -- Felipe.