package babel

  1. Overview
  2. Docs

Source file babel_fn.ml

1
2
3
4
5
6
7
8
9
10
11
12
13
open Core
include Fn

include Applicative.Make2_using_map2 (struct
  type ('a, 'b) t = 'b -> 'a

  let return = const
  let map t ~f a = f (t a)
  let map2 t1 t2 ~f a = f (t1 a) (t2 a)
  let map = `Custom map
end)

let map_input t ~f x = t (f x)