Module

Effect

Package
purescript-effect
Repository
purescript/purescript-effect

#Effect Source

data Effect :: Type -> Type

The Effect type constructor is used to represent native effects.

See Handling Native Effects with the Effect Monad for more details.

The type parameter denotes the return type of running the effect.

Instances

#untilE Source

untilE :: Effect Boolean -> Effect Unit

Loop until a condition becomes true.

untilE b is an effectful computation which repeatedly runs the effectful computation b, until its return value is true.

#whileE Source

whileE :: forall a. Effect Boolean -> Effect a -> Effect Unit

Loop while a condition is true.

whileE b m is effectful computation which runs the effectful computation b. If its result is true, it runs the effectful computation m and loops. If not, the computation ends.

#forE Source

forE :: Int -> Int -> (Int -> Effect Unit) -> Effect Unit

Loop over a consecutive collection of numbers.

forE lo hi f runs the computation returned by the function f for each of the inputs between lo (inclusive) and hi (exclusive).

#foreachE Source

foreachE :: forall a. Array a -> (a -> Effect Unit) -> Effect Unit

Loop over an array of values.

foreachE xs f runs the computation returned by the function f for each of the inputs xs.