effectful 0.3.0

Effect<A, E, R> (sync + async), context/layers, pipe — interpreter-style, no bundled executor
Documentation
1
2
3
4
5
6
7
8
9
10
11
//! Ex 022 — `Get::<K>::get` reads the head cell.
use effectful::{Get, Service, ctx};

#[derive(Clone, Copy, Debug, Default, PartialEq, Eq, Hash, Service)]
struct K;

fn main() {
  let env = ctx!(K => "here");
  assert_eq!(*Get::<K>::get(&env), "here");
  println!("022_get_here ok");
}