Skip to main content

Module runnable

Module runnable 

Source
Expand description

A functor whose effects can be “run” to produce the inner value.

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

§Examples

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

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

Traits§

Runnable
A functor whose effects can be “run” to produce the inner value.

Functions§

run
Runs the effect, producing the inner value.