id_effect 0.4.0

Effect<A, E, R> (sync + async), capability DI, pipe — interpreter-style, no bundled executor
Documentation
1
2
3
4
5
6
7
8
9
10
//! Foldable and Alternative over Option.

use id_effect::algebra::alternative::option::alt;
use id_effect::algebra::foldable::option::fold_right;

fn main() {
  let v = fold_right(Some(10), 0, |a, b| a + b);
  let c = alt(None, Some(42));
  println!("fold={v} alt={c:?}");
}