Skip to content

Module Stdlib.StdLabels

Standard labeled libraries.

This meta-module provides versions of the Array, Bytes, List and String modules where function arguments are systematically labeled. It is intended to be opened at the top of source files, as shown below.

ocaml
  open StdLabels

  let to_upper = String.map ~f:Char.uppercase_ascii
  let seq len = List.init ~f:(fun i -> i) ~len
  let everything = Array.create_matrix ~dimx:42 ~dimy:42 42
reasonml
open StdLabels;

let to_upper = String.map(~f=Char.uppercase_ascii);
let seq = len => List.init(~f=i => i, ~len);
let everything = Array.create_matrix(~dimx=42, ~dimy=42, 42);
ocaml
module Array = ArrayLabels
reasonml
module Array = ArrayLabels;
ocaml
module Bytes = BytesLabels
reasonml
module Bytes = BytesLabels;
ocaml
module List = ListLabels
reasonml
module List = ListLabels;
ocaml
module String = StringLabels
reasonml
module String = StringLabels;