package dream

  1. Overview
  2. Docs
Tidy, feature-complete Web framework

Install

Dune Dependency

Authors

Maintainers

Sources

dream-1.0.0-alpha1.tar.gz
sha256=c8d988568fbbeffb151abdb4d6b903fbd3897842d3eb9b2c28fb350f0f02bbd4
md5=b8ad7f3e30f3e88e5451d92e42b49ce4

doc/src/websocketaf/optional_thunk.ml.html

Source file optional_thunk.ml

1
2
3
4
5
6
7
8
9
10
11
12
type t = unit -> unit

let none = Sys.opaque_identity (fun () -> ())
let some f =
  if f == none
  then failwith "Optional_thunk: this function is not representable as a some value";
  f

let is_none t = t == none
let is_some t = not (is_none t)
let call_if_some t = t ()
let unchecked_value t = t
OCaml

Innovation. Community. Security.