package amqp-client

  1. Overview
  2. Docs
Amqp client library compatable with async and lwt.

Install

Dune Dependency

Authors

Maintainers

Sources

1.1.2.tar.gz
sha256=6c3a8cc629fd3d5a7e0eb0dff4cd9306b70dffb226e8c18e77cc6c9b667886be
md5=0cd25b9808251fbb5e19517d7a3aad4b

doc/src/amqp-client.lib/option.ml.html

Source file option.ml

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
(**/**)
type 'a t = 'a option

let get ~default = function
  | None -> default
  | Some v -> v

let get_exn ?(exn=Invalid_argument "None") = function
  | None -> raise exn
  | Some v -> v

let map_default ~default ~f = function
  | None -> default
  | Some v -> f v

let map ~f = function
  | None -> None
  | Some v -> Some (f v)

let iter ~f = function
  | None -> ()
  | Some v -> f v
(**/**)
OCaml

Innovation. Community. Security.