We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ac7d140 commit ff6002dCopy full SHA for ff6002d
prelude.ml
@@ -35,6 +35,8 @@ struct
35
let project_list = id
36
let compare = T.compare
37
let equal a b = T.compare a b = 0
38
+ let map f x = inject @@ f @@ project x
39
+ let map2 f x y = inject @@ f (project x) (project y)
40
end
41
42
let (+=) a b = a := !a + b
prelude.mli
@@ -61,6 +61,8 @@ sig
61
val project_list : t list -> T.t list
62
val compare : t -> t -> int
63
val equal : t -> t -> bool
64
+ val map : (T.t -> T.t) -> t -> t
65
+ val map2 : (T.t -> T.t -> T.t) -> t -> t -> t
66
67
68
val tuck : 'a list ref -> 'a -> unit
0 commit comments