js_of_ocaml
Compiler from OCaml bytecode to JavaScript
1024" x-on:close-sidebar="sidebar=window.innerWidth > 1024 && true">
package js_of_ocaml
-
js_of_ocaml
-
-
js_of_ocaml.deriving
Legend:
Library
Module
Module type
Parameter
Class
Class type
Library
Module
Module type
Parameter
Class
Class type
Library js_of_ocaml
val empty : 'a t
No value.
val return : 'a -> 'a t
Consider a value as an optional value.
Apply a function to an optional value if it is available. Returns the result of the application.
Apply a function returning an optional value to an optional value
val test : 'a t -> bool
Returns true
if a value is available, false
otherwise.
val iter : 'a t -> ( 'a -> unit ) -> unit
Apply a function to an optional value if it is available.
val case : 'a t -> ( unit -> 'b ) -> ( 'a -> 'b ) -> 'b
Pattern matching on optional values.
val get : 'a t -> ( unit -> 'a ) -> 'a
Get the value. If no value available, an alternative function is called to get a default value.
val option : 'a option -> 'a t
Convert option type.
val to_option : 'a t -> 'a option
Convert to option type.
ON THIS PAGE
No table of contents