package gen

  1. Overview
  2. Docs
Iterators for OCaml, both restartable and consumable

Install

dune-project
 Dependency

Authors

Maintainers

Sources

0.5.2.tar.gz
md5=dd731ef527022ea698955db687e6cb5f
sha512=c84e5ea0c9b3a678b6a5c935eacf91265a79b68a48375c44aa5f159d4cb02283c1be0786e172a153666c670bc7ee37b931004b8747a99e5f4ab90ca63e097ff5

doc/gen/GenClone/IO/index.html

Module GenClone.IO

val with_in : ?mode:int -> ?flags:open_flag list -> string -> (char t -> 'a) -> 'a

read filename f opens filename and calls f g, where g is a clonable generator of characters from the file. It can be cloned by calling g#save (which saves the position in the file), and used with g#next. Distinct clones of g shouldn't be used at the same time (otherwise Failure _ will be raised). Both the generator and save points are only valid within the scope in which f is called.