Skip to main content

Module evaluable

Module evaluable 

Source
Expand description

Functors whose effects can be evaluated to produce an inner value.

This trait is used by Free::evaluate to execute the effects in a Free monad.

§Examples

use fp_library::{brands::*, functions::*, types::*};

let thunk = Thunk::new(|| 42);
assert_eq!(evaluate::<ThunkBrand, _>(thunk), 42);

Traits§

Evaluable
A functor whose effects can be evaluated to produce the inner value.

Functions§

evaluate
Evaluates the effect, producing the inner value.