Simon Cruanes
a5385ce649
API change for Sequence.persistent: no need to
...
provide a block size, the unrolled list manages it (doubling block size);
new implementation for persistent is more efficient.
2014-02-27 11:51:57 +01:00
Simon Cruanes
b1e5176177
printing functions
2013-11-18 15:17:22 +01:00
Simon Cruanes
61a4f64e75
decreasing int range operator
2013-11-18 15:10:07 +01:00
Simon Cruanes
b54714957a
document to_list
2013-10-21 13:35:11 +02:00
Simon Cruanes
85b063737f
allow to specify the blocksize in persistent
2013-10-20 22:02:19 +02:00
Simon Cruanes
d0bedb7a76
documentation
2013-10-20 21:56:57 +02:00
Simon Cruanes
855428b2e9
more doc
2013-10-20 21:05:26 +02:00
Simon Cruanes
12c0c5a6f5
fmap function
2013-08-28 15:01:09 +02:00
Simon Cruanes
4f06874e39
more natural functors to adapt Set and Map
2013-08-28 14:57:28 +02:00
Simon Cruanes
bd472ba2e0
small error in comment
2013-03-10 15:41:21 +01:00
Simon Cruanes
7eb4fb370b
Sequence.join combinator
2013-03-10 15:36:26 +01:00
Simon Cruanes
91a167a885
small API updates; Sequence.intersperse has a signature that is consistent
...
with the rest of the API, and combines well with |>
2013-03-10 15:26:50 +01:00
Simon Cruanes
f1c101310c
update header of sequence.mli to explain some assumptions about sequences.
2013-03-10 15:17:27 +01:00
Simon Cruanes
e23e1f8da1
added alias 'flatten' for 'concat'
2013-03-08 18:09:22 +01:00
Simon Cruanes
2aef4afa6a
sort, uniq, group and sort_uniq combinators implemented
2013-03-08 15:11:26 +01:00
Simon Cruanes
43f4f25ed7
some conversion functions that use Sequence.t2
2013-03-07 19:52:04 +01:00
Simon Cruanes
ba3564c2bb
infix operators in Sequence.Infix
2013-03-07 19:48:22 +01:00
Simon Cruanes
b109e99c00
Sequence.t2 type for efficient iteration on pairs of elements;
...
some combinators are adapted to Sequence.t2;
zip, unzip and zip_i to convert between t and t2
2013-03-07 19:42:10 +01:00
Simon Cruanes
b308a8ae87
added scan combinator
2013-03-07 19:30:57 +01:00
Simon Cruanes
836049b6f1
Sequence.to_stream implemented (O(n) memory and time)
2013-03-01 15:56:35 +01:00
Simon Cruanes
2ba0cfe2f4
added some typeclasses in a submodule
2013-02-27 17:52:29 +01:00
Simon Cruanes
df7ef45ad5
added Sequence.persistent function (copy sequence in memory);
...
implementation is done by unrolled linked list (also used for Sequence.rev and Sequence.to_array);
should be quite efficient in time and memory
2013-02-25 02:18:40 +01:00
Simon Cruanes
d64691f1b3
creation of the empty sequence
2013-02-18 17:23:56 +01:00
Simon Cruanes
099b0bbb8d
some combinators (inspired by Data.List in Haskell):
...
intersperse, product, unfoldr, max and min
2013-02-18 17:20:15 +01:00
Simon Cruanes
8c44f7c63e
added flatMap to the combinators
2013-02-18 17:04:24 +01:00
Simon Cruanes
55ff51f2cb
more combinators (iterate and forever);
...
some sequences of random elements
2013-02-15 17:35:05 +01:00
Simon Cruanes
45e331861d
more Sequence constructors and consumers
2013-02-15 17:20:33 +01:00
Simon Cruanes
af0c94dab4
functorial interface for Set too
2013-02-07 16:16:23 +01:00
Simon Cruanes
07cc9df645
offer two different functions for combining Map and Seq. Both build
...
an extended version of Map, with additional conversion functions relative to Sequence.
One can Adapt an already existing Map module, or Make an extended Map directly
2013-02-07 16:07:16 +01:00
Simon Cruanes
301205fafd
junk signature removed
2013-02-06 14:54:15 +01:00
Simon Cruanes
2bf5b628ab
removed type-conversion submodules, now replaced by simple values.
...
For instance, Sequence.List.of_seq is now Sequence.to_list.
Conversion with Set now uses first-class modules to avoir functor hell
(not done on Map because of limitations in the type systems)
2013-02-06 14:53:33 +01:00
Simon Cruanes
438159aa90
length and is_empty functions for Sequence
2013-02-05 16:40:31 +01:00
Simon Cruanes
8ee07ed6a2
cycle and repeat operators directly in Sequence
2013-02-05 09:57:09 +01:00
Simon Cruanes
28332a45df
read sequence of chars from a channel
2013-02-04 23:29:18 +01:00
Simon Cruanes
0b47a10e9b
more functions on Hashtbl;
...
functor for conversion between Map and Sequence
2013-01-29 14:40:11 +01:00
Simon Cruanes
087c38aa0c
more efficient Array.of_seq (only allocates one intermediate list, then reverse the array);
...
test of Array.to_seq and Sequence.append
2013-01-29 14:31:21 +01:00
Simon Cruanes
1e90120295
use a functor rather than first-class modules, for Set
2013-01-29 14:11:47 +01:00
Simon Cruanes
ee4ce9c9ba
generic sequence pretty-printing function
2013-01-29 11:13:46 +01:00
Simon Cruanes
fbc4946a99
add conversion from/to Stack, Queue, and add functions for Array and Ints;
...
also added more doc
2013-01-28 15:13:05 +01:00
Simon Cruanes
fa412b7ece
reformatted license prelude;
...
add a Set conversion module, using first class modules of ocaml>=3.12
2013-01-28 14:32:06 +01:00
Simon Cruanes
024e0115db
added license prelude to files; added Sequence.singleton builder
2013-01-28 01:41:43 +01:00
Simon Cruanes
8e9842c2b6
generate documentation
2013-01-28 01:08:15 +01:00
Simon Cruanes
0534a1fc2b
for_all, rev, iteri, exists added to sequence
2013-01-28 01:04:42 +01:00
Simon Cruanes
7dbd8d15e3
append/concat primitives
2013-01-28 00:55:57 +01:00
Simon Cruanes
57b778f6cc
iterate on integers
2013-01-28 00:34:54 +01:00
Simon Cruanes
e5039470e8
renamed Sequence.sequence to Sequence.t
2013-01-28 00:12:19 +01:00
Simon Cruanes
546a77ba8f
modules to convert lists and hashtables from/to sequences
2013-01-28 00:09:48 +01:00
Simon Cruanes
0f04cb8f5c
take, concat and drop functions
2013-01-27 23:37:47 +01:00
Simon Cruanes
4982630967
sequence type
2013-01-27 23:17:29 +01:00