Module Current.Syntax

Applicative syntax

val let+ : 'a t -> ('a -> 'b) -> 'b t

Syntax for map. Use this to process the result of a term without using any special effects.

val and+ : 'a t -> 'b t -> ('a * 'b) t

Syntax for pair. Use this to depend on multiple terms.

Monadic syntax

val let* : 'a t -> ('a -> 'b t) -> 'b t

Monadic bind. Use this if the next part of your pipeline can only be determined at runtime by looking at the concrete value. Static analysis cannot predict what this will do until the input is ready.

val let> : 'a t -> ('a -> 'b Primitive.t) -> description -> 'b t

let> is used to define a component. e.g.:

component "my-op" |>
  let> x = fetch uri in
  ...
val let** : 'a t -> ('a -> 'b t) -> description -> 'b t

Like let*, but allows you to name the operation. e.g.:

component "my-op" |>
  let** x = fetch uri in
  ...
val and* : 'a t -> 'b t -> ('a * 'b) t

Syntax for pair. Use this to depend on multiple terms. Note: this is the same as and+.

val and> : 'a t -> 'b t -> ('a * 'b) t

Syntax for pair. Use this to depend on multiple terms. Note: this is the same as and+.