package containers

  1. Overview
  2. Docs
Source of characters
type individual_char =
  1. | NC_yield of char
  2. | NC_end
  3. | NC_await
    (*

    An individual character returned by a source

    *)
type t = unit -> individual_char

A source of characters can yield them one by one, or signal the end, or signal that some external intervention is needed

type source = t
module Manual : sig ... end

A manual source of individual characters. When it has exhausted its own input, it asks its caller to provide more or signal that none remains This is especially useful when the source of data is monadic IO

val of_string : string -> t

Use a single string as the source

val of_chan : ?bufsize:int -> Pervasives.in_channel -> t

Use a channel as the source

val of_gen : string gen -> t
OCaml

Innovation. Community. Security.