package containers

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
val (%>) : ('a -> 'b) -> ('b -> 'c) -> 'a -> 'c

(f %> g) x or (%>) f g x is g (f x). Alias to compose.

val (%) : ('b -> 'c) -> ('a -> 'b) -> 'a -> 'c

(f % g) x or (%) f g x is f (g x). Mathematical composition.

val let@ : ('a -> 'b) -> 'a -> 'b

let@ x = foo in bar is the equivalent of foo @@ fun x -> bar. It can be very useful for resource management, alongside with protect.

  • since 3.11
val (||>) : ('a * 'b) -> ('a -> 'b -> 'c) -> 'c

x ||> f is f (fst x) (snd x)

  • since 3.13.1
val (|||>) : ('a * 'b * 'c) -> ('a -> 'b -> 'c -> 'd) -> 'd

like ||> but for tuples of size 3

  • since 3.13.1
OCaml

Innovation. Community. Security.