aoc2023/ocaml/lib/fn.ml

6 lines
191 B
OCaml
Raw Normal View History

2023-12-01 10:17:20 +01:00
(** [f << g] composes [f] with [g] right-to-left -- i.e. [f (g x)] *)
let (<<) f g x = f (g x)
(** [f << g] composes [f] with [g] left-to-right -- i.e. [g (f x)] *)
let (>>) f g x = g (f x)