package algaeff

  1. Overview
  2. Docs

Module Algaeff.StateSource

Effects for changing states.

  module S = Algaeff.State.Make (Int)

  let forty_two = S.run ~init:100 @@ fun () ->
    print_int (S.get ()); (* this will print out 100 *)
    S.set 42;
    S.get ()
Sourcemodule type S = sig ... end

Signatures of read effects.

Sourcemodule Make (State : Sigs.Type) : S with type state := State.t

The implementation of state effects.

OCaml

Innovation. Community. Security.