mirror of
https://github.com/c-cube/iter.git
synced 2025-12-06 03:05:29 -05:00
update of README;
in Makefile, only build tests if required, because it requires ocaml4
This commit is contained in:
parent
cc241eeb33
commit
d0c858ab9d
2 changed files with 18 additions and 5 deletions
5
Makefile
5
Makefile
|
|
@ -6,7 +6,10 @@ LIB = $(addprefix _build/, $(TARGETS))
|
||||||
INSTALL = $(LIB) sequence.mli
|
INSTALL = $(LIB) sequence.mli
|
||||||
|
|
||||||
all:
|
all:
|
||||||
ocamlbuild tests.native $(TARGETS) $(DOC)
|
ocamlbuild $(TARGETS) $(DOC)
|
||||||
|
|
||||||
|
tests:
|
||||||
|
ocamlbuild tests.native
|
||||||
|
|
||||||
install: all
|
install: all
|
||||||
ocamlfind install $(NAME) META $(INSTALL)
|
ocamlfind install $(NAME) META $(INSTALL)
|
||||||
|
|
|
||||||
18
README.md
18
README.md
|
|
@ -2,8 +2,15 @@ Sequence
|
||||||
========
|
========
|
||||||
|
|
||||||
Simple sequence abstract datatype, intented to transfer a finite number of
|
Simple sequence abstract datatype, intented to transfer a finite number of
|
||||||
elements from one data structure to another. It also provides a tiny
|
elements from one data structure to another. Some transformations on sequences,
|
||||||
library for S-expressions, convertible to streams of tokens, and conversely.
|
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
|
Build
|
||||||
=====
|
=====
|
||||||
|
|
@ -13,8 +20,11 @@ You need OCaml, say OCaml 3.12 or OCaml 4.0.
|
||||||
$ make
|
$ make
|
||||||
|
|
||||||
To see how to use it, check `tests.ml`. `sequence.ml` has a few examples of how to convert
|
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
|
data structures into sequences, and conversely.
|
||||||
of the S-expression library.
|
|
||||||
|
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
|
License
|
||||||
=======
|
=======
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue