package bonsai

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

This Let_syntax module is basically just Value.Let_syntax with the addition of the sub function, which operates on Computations.

By using the let%sub syntax extension, you can put a 'a Computation.t on the RHS and get a 'a Value.t on the LHS.

let%sub a = b in
...

In the code above, b has type 'a Computation.t, and a has type 'a Value.t.

val return : 'a Value.t -> 'a Computation.t
val (>>|) : 'a Value.t -> ('a -> 'b) -> 'b Value.t
val (<*>) : ('a -> 'b) Value.t -> 'a Value.t -> 'b Value.t
val (<$>) : ('a -> 'b) -> 'a Value.t -> 'b Value.t
module Let_syntax : sig ... end