aboutsummaryrefslogtreecommitdiffhomepage
path: root/clib/option.mli
diff options
context:
space:
mode:
Diffstat (limited to 'clib/option.mli')
-rw-r--r--clib/option.mli3
1 files changed, 3 insertions, 0 deletions
diff --git a/clib/option.mli b/clib/option.mli
index 226099352..67b42268a 100644
--- a/clib/option.mli
+++ b/clib/option.mli
@@ -43,6 +43,9 @@ val get : 'a option -> 'a
(** [make x] returns [Some x]. *)
val make : 'a -> 'a option
+(** [bind x f] is [f y] if [x] is [Some y] and [None] otherwise *)
+val bind : 'a option -> ('a -> 'b option) -> 'b option
+
(** [init b x] returns [Some x] if [b] is [true] and [None] otherwise. *)
val init : bool -> 'a -> 'a option