mirror of
https://github.com/c-cube/ocaml-containers.git
synced 2025-12-08 04:05:30 -05:00
missing function in CCListLabels
This commit is contained in:
parent
f28b75792b
commit
66d4ae9811
1 changed files with 14 additions and 0 deletions
|
|
@ -97,6 +97,20 @@ val partition_map : f:('a -> [<`Left of 'b | `Right of 'c | `Drop]) ->
|
||||||
- if [f x = `Drop], ignores [x]
|
- if [f x = `Drop], ignores [x]
|
||||||
@since 0.11 *)
|
@since 0.11 *)
|
||||||
|
|
||||||
|
val sublists_of_len :
|
||||||
|
?last:('a list -> 'a list option) ->
|
||||||
|
?offset:int ->
|
||||||
|
len:int ->
|
||||||
|
'a list ->
|
||||||
|
'a list list
|
||||||
|
(** [sublists_of_len n l] returns sub-lists of [l] that have length [n].
|
||||||
|
By default, these sub-lists are non overlapping:
|
||||||
|
[sublists_of_len 2 [1;2;3;4;5;6]] returns [[1;2]; [3;4]; [5;6]].
|
||||||
|
|
||||||
|
See {!CCList.sublists_of_len} for more details.
|
||||||
|
|
||||||
|
@since NEXT_RELEASE *)
|
||||||
|
|
||||||
val pure : 'a -> 'a t
|
val pure : 'a -> 'a t
|
||||||
|
|
||||||
val (<*>) : ('a -> 'b) t -> 'a t -> 'b t
|
val (<*>) : ('a -> 'b) t -> 'a t -> 'b t
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue