package yocaml

  1. Overview
  2. Docs
val traverse : ('a -> 'b t) -> 'a list -> 'b list t

Map each element of a structure to an action, evaluate these actions from left to right, and collect the results.

val sequence : 'a t list -> 'a list t

Evaluate each action in the structure from left to right, and collect the results

val filter_map : ('a -> 'b option t) -> 'a list -> 'b list t

filter_map that acts on effectful predicates.

val fold_left : ('acc t -> 'a -> 'acc t) -> 'acc t -> 'a t list -> 'acc t

fold_left f default l apply f on each value of l, accumulating into default.

OCaml

Innovation. Community. Security.