hemokit-0.6.0: Haskell port of the Emokit EEG project

Safe HaskellSafe-Inferred

Hemokit.Internal.Utils

Synopsis

Documentation

withJustM :: Monad m => m (Maybe a) -> (a -> m ()) -> m Bool

If the monad retuns a Just, runs the function on its contents. Returns True if the action was executed.

untilNothing :: Monad m => m (Maybe a) -> (a -> m ()) -> m Bool

Runs the monadic action as long as the producer returns Justs. Returns True if the action was ever executed.