A lightweight, modular standard library extension, string library, and interfaces to various libraries (unix, threads, etc.) BSD license.
Find a file
Simon Cruanes 2a0ebbeaf7 Squashed 'sequence/' changes from efeb0fc..a5a1315
a5a1315 implement Set.Adapt.of_list for < 4.02
cdae072 removed many warnings
0226a4c more warnings enabled; fix tests
22705b2 change name of IO functions (keep compat)
REVERT: efeb0fc merge from master; version 0.5.4
REVERT: 2691bee version 0.5.3
REVERT: a373739 merge from master
REVERT: 0d721a6 release 0.5.2
REVERT: a50f307 merge from master
REVERT: e5625c6 merge from master: version 0.5.1
REVERT: 2ae771f oasis files

git-subtree-dir: sequence
git-subtree-split: a5a1315f7915761f2a85f3d0b7f88b81fb0a8f1d
2014-12-01 16:05:36 +01:00
bench Squashed 'sequence/' content from commit e5625c6 2014-08-08 20:16:15 +02:00
bigarray Squashed 'sequence/' changes from efeb0fc..a5a1315 2014-12-01 16:05:36 +01:00
examples Squashed 'sequence/' content from commit e5625c6 2014-08-08 20:16:15 +02:00
invert Squashed 'sequence/' changes from efeb0fc..a5a1315 2014-12-01 16:05:36 +01:00
tests Squashed 'sequence/' changes from efeb0fc..a5a1315 2014-12-01 16:05:36 +01:00
.gitignore Squashed 'sequence/' content from commit e5625c6 2014-08-08 20:16:15 +02:00
.merlin Squashed 'sequence/' changes from 2691bee..efeb0fc 2014-11-04 22:19:26 +01:00
.ocamlinit Squashed 'sequence/' changes from 2691bee..efeb0fc 2014-11-04 22:19:26 +01:00
_oasis Squashed 'sequence/' changes from efeb0fc..a5a1315 2014-12-01 16:05:36 +01:00
_tags Squashed 'sequence/' changes from efeb0fc..a5a1315 2014-12-01 16:05:36 +01:00
CHANGELOG.md Squashed 'sequence/' changes from efeb0fc..a5a1315 2014-12-01 16:05:36 +01:00
configure Squashed 'sequence/' content from commit e5625c6 2014-08-08 20:16:15 +02:00
LICENSE Squashed 'sequence/' content from commit e5625c6 2014-08-08 20:16:15 +02:00
Makefile Squashed 'sequence/' changes from efeb0fc..a5a1315 2014-12-01 16:05:36 +01:00
META Squashed 'sequence/' changes from efeb0fc..a5a1315 2014-12-01 16:05:36 +01:00
myocamlbuild.ml Squashed 'sequence/' changes from efeb0fc..a5a1315 2014-12-01 16:05:36 +01:00
README.md Squashed 'sequence/' content from commit e5625c6 2014-08-08 20:16:15 +02:00
sequence.ml Squashed 'sequence/' changes from efeb0fc..a5a1315 2014-12-01 16:05:36 +01:00
sequence.mldylib Squashed 'sequence/' content from commit e5625c6 2014-08-08 20:16:15 +02:00
sequence.mli Squashed 'sequence/' changes from 2691bee..efeb0fc 2014-11-04 22:19:26 +01:00
sequence.mllib Squashed 'sequence/' content from commit e5625c6 2014-08-08 20:16:15 +02:00
sequence.odocl Squashed 'sequence/' content from commit e5625c6 2014-08-08 20:16:15 +02:00
setup.ml Squashed 'sequence/' changes from efeb0fc..a5a1315 2014-12-01 16:05:36 +01: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.