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
11
# Foldable and Alternative

**Foldable** summarizes collections; **Alternative** expresses choice (`empty` / `alt`).

```rust
use id_effect::algebra::foldable::option::fold_right;
use id_effect::algebra::alternative::option::{alt, empty};

let sum = fold_right(Some(3), 0, |a, b| a + b);
let chosen = alt(empty(), Some(42));
```