A portable standard library enhancement for Reason and OCaml.

Standard provides an easy-to-use, comprehensive and safe standard library that has the same API for the OCaml and Bucklescript compilers.

open Standard;
|> List.filterMap(~f=character =>
|> Int.add(1)
|> Char.ofCode
|> String.ofList
/* "Tuboebse" */


Works with either the Reason or OCaml syntax, targeting the Bucklescript, Native or js_of_ocaml compilers


Banish runtime errors and work effectively with Options and Results


Index operators for Arrays, Maps, Sets and Strings plus binding operators for Options & Results mean your code is concise and expressive
open Standard
let nameToSpecies = Map.String.ofList [
("Alan", "Ant");
("Bertie", "Badger");
] in
let nameToSpecies =
nameToSpecies.Map.?{"Delilah"} <- "Duck" in
let hybrid = Option.(
let+ delilahSpecies =
nameToSpecies.Map.?{"Delilah"} in
and+ frankSpecies =
nameToSpecies.Map.?{"Frank"} |? "Cat" in
delilahSpecies ^ frankSpecies
) in
hybrid = Some "DuckCat"

Easy to learn

Excellent documentation, comprehensive examples and consistent behaviour make Standard efficient to get started with