Simple iterator abstract datatype, intended to iterate efficiently on collections while performing some transformations.
Find a file
2013-02-27 17:52:29 +01:00
opam add files for opam 2013-01-29 15:45:29 +01:00
.gitignore generate documentation 2013-01-28 01:08:15 +01:00
LICENSE Add README and license 2013-01-27 23:45:30 +01:00
Makefile update of README; 2013-02-11 11:52:54 +01:00
META do not install the toy Sexpr module 2013-02-10 19:53:39 +01:00
README.md update of README; 2013-02-11 11:52:54 +01:00
sequence.ml added some typeclasses in a submodule 2013-02-27 17:52:29 +01:00
sequence.mli added some typeclasses in a submodule 2013-02-27 17:52:29 +01:00
sequence.odocl generate documentation 2013-01-28 01:08:15 +01:00
sexpr.ml more combinators in Sexpr; 2013-02-08 23:20:42 +01:00
sexpr.mli more combinators in Sexpr; 2013-02-08 23:20:42 +01:00
tests.ml test Sexpr parsing and printing, with 2013-02-08 23:21:48 +01:00

Sequence

Simple sequence abstract datatype, intented to transfer a finite number of elements from one data structure to another. Some transformations on sequences, like filter, map, take, drop and append can be performed before the sequence is iterated/folded on.

Sequence is not designed to be as general-purpose or flexible as, say, Batteries' Enum.t. Rather, it aims at providing a very simple and efficient way of iterating on a finite number of values, only allocating (most of the time) one intermediate closure to do so. For instance, iterating on keys, or values, of a Hashtbl.t, without creating a list.

Build

You need OCaml, say OCaml 3.12 or OCaml 4.0.

$ make

To see how to use it, check tests.ml. sequence.ml has a few examples of how to convert data structures into sequences, and conversely.

The module sexpr.mli exposes the interface of the S-expression example library. It requires OCaml>=4.0 to compile, because of the GADT structure used in the monadic parser combinators part of sexpr.ml.

License

Sequence is available under the BSD license.