package monolith

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
exception ForcedTwice

This exception is raised by oneshot and by several other functions that internally depend on oneshot.

val oneshot : ('a -> 'b) -> 'a -> 'b

oneshot transforms a function into a one-shot function. A one-shot function raises ForcedTwice if it is invoked twice.

val affine : 'a Seq.t -> 'a Seq.t

affine transforms a sequence into an affine sequence. An affine sequence raises ForcedTwice if it is forced twice.

val to_option : 'a Seq.t -> ('a * 'a Seq.t) option

to_option forces a sequence and converts its head to an option.

val list_to_affine_seq : 'a list -> 'a Seq.t

list_to_affine_seq transforms a list into an affine sequence. An affine sequence raises ForcedTwice if forced twice.

OCaml

Innovation. Community. Security.