Commit graph

13 commits

Author SHA1 Message Date
Simon Cruanes
0b0dd83423
reformat all the things 2024-05-13 20:57:53 -04:00
Simon Cruanes
1a23731730
remove conditional over OCaml >= 4.08
in particular, all the let-ops are now unconditional!
2023-06-24 15:22:21 -04:00
Fardale
399cd6d570 fix(CCSeq): add implementation of concat_map 2022-09-21 16:20:02 +02:00
Fardale
b2ec88b0e1 feat(CCSeq): add some missing function from 4.14 2022-09-21 15:44:18 +02:00
Fardale
47ff9935dc include Seq in CCSeq for ocaml >= 4.07 2022-09-20 15:09:45 +02:00
Simon Cruanes
10865eaced reformat 2022-07-04 13:36:06 -04:00
Simon Cruanes
b695918e99
move all core tests to new testlib 2022-07-02 00:29:25 -04:00
Simon Cruanes
45f567dca1
perf: reduce allocations in CCSeq.to_array 2022-02-11 21:15:09 -05:00
Simon Cruanes
2d30b2ae14
add CCSeq.{zip_i,of_string} 2022-01-27 13:48:49 -05:00
Shon Feder
946ac4e05d
Make CCSeq.to_array behave better with stateful sequences (#390)
Make Seq.to_array only traverse seq once

This PR suggests a change to `Seq.to_array`, which uses construction of
an intermediate list to prevent traversing the Seq twice. This requires
the allocation of an intermediate list, but it eliminates the surprising
behavior that otherwise occurs with state-full sequences, due to the
extra traversal required to obtain the length of the sequence. E.g.,
with the previous implementation, the value of `to_array` for the
sequence constructed in the test added in this commit is `[|4;5;6|]`,
while `to_list` gives `[|1;2;3|]`.
2021-12-11 21:28:10 -05:00
Bertrand Bonnefoy-Claudet
13028c3d17 CCSeq: Add for_all and exists
The functions are implemented the same way as in `oseq` and their
documentation is inspired from their counterparts in `Stdlib.List`.
2021-03-29 18:16:44 -04:00
Fardale
01da25cead break: change pp functions to take unit printer for sep/stop/start
sep/stop/start -> pp_sep/pp_stop/pp_start
string -> unit printer
2020-07-27 22:57:29 -04:00
Simon Cruanes
a767e4618d wip(3.0): remove deprecated functions, in particular sequence 2020-04-24 20:16:53 -04:00