luautils-0.1.4: Helpers for Haskell integration with Lua

Safe HaskellSafe-Inferred
LanguageHaskell98

Scripting.LuaUtils.Internal.Util

Synopsis

Documentation

whileIterateM :: Monad m => (a -> m Bool) -> (a -> m a) -> a -> m a Source

"whileIterateM b f a" will execute action (f a) while (b a) is true and also feed the results back to the next iteration.

ifM :: Monad m => m Bool -> m a -> m a -> m a Source

Monadic version of the if condition

bool :: a -> a -> Bool -> a Source

Bool deconstructor in the spirit of either and maybe Similar to the lambda-if proposal

forM_ :: Monad m => [a] -> (a -> m b) -> m () Source