package datakit-ci

  1. Overview
  2. Docs

Infix operators

val ($) : ('a -> 'b) t -> 'a t -> 'b t

fn $ x is the result of applying the evaluation of the term fn to the evaluation of the term x. fn and x are evaluated in parallel. While fn is not successful, the result is the same as fn. Otherwise, if x is not successful then the result is the same as x. You can use $ multiple times to support functions of multiple arguments (e.g. fn $ a $ b $ c). Use with join if fn itself returns a term.

val (>>=) : 'a t -> ('a -> 'b t) -> 'b t

x >>= fn (bind) is fn y where y is the successful result of evaluating x, or simply x if x is not successful.

val (>|=) : 'a t -> ('a -> 'b) -> 'b t

x >|= fn (map) is return (fn y) where y is the successful result of evaluating x, or simply x if x is not successful.