Orsak


Effect<'r, 'a, 'e> Type

Describes an effect that can either succeed with , or fails with . The effect is is 'cold', and only starts when run with an .

Union cases

Union case Description

Effect EffectDelegate<'r, 'a, 'e>

Full Usage: Effect EffectDelegate<'r, 'a, 'e>

Parameters:
Item : EffectDelegate<'r, 'a, 'e>

Instance members

Instance member Description

this.Run

Full Usage: this.Run

Parameters:
    r : 'r

Returns: AsyncResult<'a, 'e>
Modifiers: inline

Starts the effect. A that can be awaited to get the result of the effect

r : 'r
Returns: AsyncResult<'a, 'e>

this.RunOrFail

Full Usage: this.RunOrFail

Parameters:
    r : 'r

Returns: Task<'a>
Modifiers: inline

Starts the effect, and raises an exception in case of error. Prefer Run. A that can be awaited to get the result of the effect

r : 'r
Returns: Task<'a>

Static members

Static member Description

f <*> e

Full Usage: f <*> e

Parameters:
Returns: Effect<'a, 'c, 'd>
Modifiers: inline

Implements Apply on the effect, making it an applicative

f : Effect<'a, ('b -> 'c), 'd>
e : Effect<'a, 'b, 'd>
Returns: Effect<'a, 'c, 'd>

h >>= f

Full Usage: h >>= f

Parameters:
Returns: Effect<'r, 'b, 'e>
Modifiers: inline

Implements Bind on the effect, which together with the functor Return makes it a Monad

h : Effect<'r, 'a, 'e>
f : 'a -> Effect<'r, 'b, 'e>
Returns: Effect<'r, 'b, 'e>

Effect.Map(h, f)

Full Usage: Effect.Map(h, f)

Parameters:
    h : Effect<'r, 'a, 'e>
    f : 'a -> 'b

Returns: Effect<'r, 'b, 'e>
Modifiers: inline

Implements Map on the effect, making it a Functor

h : Effect<'r, 'a, 'e>
f : 'a -> 'b
Returns: Effect<'r, 'b, 'e>

Effect.Return(a)

Full Usage: Effect.Return(a)

Parameters:
    a : 'a

Returns: Effect<'b, 'a, 'c>
Modifiers: inline

Implements Return on the effect

a : 'a
Returns: Effect<'b, 'a, 'c>