Simple iterator abstract datatype, intended to iterate efficiently on collections while performing some transformations.
Find a file
Simon Cruanes 9b6acc00ae a bugfix in Sequence.product;
changed default block size of MList
2013-03-08 16:05:34 +01:00
.gitignore gitignore 2013-03-07 19:14:16 +01:00
.merlin .merlin config file 2013-03-01 15:56:11 +01:00
bench.ml added a benchmark file to compare with ExtLib.Enum.t (not compiled by default, 2013-02-27 21:19:14 +01:00
CHANGELOG version 0.3.4 2013-03-08 15:31:48 +01:00
LICENSE Add README and license 2013-01-27 23:45:30 +01:00
Makefile added a benchmark file to compare with ExtLib.Enum.t (not compiled by default, 2013-02-27 21:19:14 +01:00
META version 0.3.4 2013-03-08 15:31:48 +01:00
README.md updated readme 2013-02-27 22:02:33 +01:00
sequence.ml a bugfix in Sequence.product; 2013-03-08 16:05:34 +01:00
sequence.mli sort, uniq, group and sort_uniq combinators implemented 2013-03-08 15:11:26 +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 Sequence.to_stream implemented (O(n) memory and time) 2013-03-01 15:56:35 +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.

Documentation

See the online API.

License

Sequence is available under the BSD license.