Simple iterator abstract datatype, intended to iterate efficiently on collections while performing some transformations.
Find a file
2016-01-08 20:45:12 +01:00
bench Get rid of the for loop 2014-05-20 22:14:23 +02:00
bigarray open Bigarray (preparing for 4.03) 2015-06-23 14:54:50 +02:00
examples make example compilable again 2014-05-26 14:49:50 +02:00
invert use delimcc in a new module, SequenceInvert, in order 2014-06-10 01:53:29 +02:00
tests add a test 2015-09-02 13:59:52 +02:00
.gitignore use oasis 2014-04-13 21:54:42 +02:00
.merlin depend on bytes; compliant with -safe-string 2014-11-04 21:45:23 +01:00
.ocamlinit sequence.bigarray 2014-10-30 01:33:43 +01:00
_oasis prepare for 0.6 2016-01-08 20:45:12 +01:00
_tags new module, SequenceLabels 2015-01-13 23:51:39 +01:00
CHANGELOG.md prepare for 0.5.5 2015-01-15 00:29:51 +01:00
configure use oasis 2014-04-13 21:54:42 +02:00
descr prepare for 0.5.5 2015-01-15 00:29:51 +01:00
LICENSE style and license headers 2016-01-08 20:41:18 +01:00
Makefile fix makefile and doc 2015-01-21 00:08:41 +01:00
META use delimcc in a new module, SequenceInvert, in order 2014-06-10 01:53:29 +02:00
myocamlbuild.ml use oasis 2014-04-13 21:54:42 +02:00
opam opam: depend on ocamlbuild 2015-12-01 21:59:28 +01:00
README.md update readme 2014-07-09 10:24:54 +02:00
sequence.ml style and license headers 2016-01-08 20:41:18 +01:00
sequence.mldylib use oasis 2014-04-13 21:54:42 +02:00
sequence.mli style and license headers 2016-01-08 20:41:18 +01:00
sequence.mllib use oasis 2014-04-13 21:54:42 +02:00
sequence.odocl use oasis 2014-04-13 21:54:42 +02:00
sequenceLabels.ml new module, SequenceLabels 2015-01-13 23:51:39 +01:00
sequenceLabels.mli style and license headers 2016-01-08 20:41:18 +01:00
setup.ml put benchmark compilation into oasis 2014-05-20 22:22:06 +02:00

Sequence

Simple sequence abstract datatype, intended 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.

Documentation

See the online API.

Build

  1. via opam opam install sequence
  2. manually (need OCaml >= 3.12): make all install

If you have OUnit installed, you can build and run tests with

$ make tests
$ ./run_tests.native

If you have Bench installed, you can build and run benchmarks with

$ make benchs
$ ./benchs.native

To see how to use the library, check the examples directory. tests.ml has a few examples of how to convert basic data structures into sequences, and conversely.

Examples

The module examples/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 examples/sexpr.ml.

License

Sequence is available under the BSD license.