mirror of
https://github.com/c-cube/ocaml-containers.git
synced 2025-12-08 12:15:32 -05:00
add another test
This commit is contained in:
parent
9e51f8dc77
commit
6b48fe873e
1 changed files with 6 additions and 0 deletions
|
|
@ -1258,6 +1258,12 @@ let replicate i x =
|
|||
repeat 2 [1;2;3] = [1;2;3;1;2;3]
|
||||
*)
|
||||
|
||||
(*$Q
|
||||
Q.(pair small_int (list int)) (fun (n,l) -> \
|
||||
if n>0 then repeat n l = flat_map (fun _ -> l) (1--n) \
|
||||
else Q.assume_fail())
|
||||
*)
|
||||
|
||||
let repeat i l =
|
||||
let rec aux acc i =
|
||||
if i = 0 then List.rev acc
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue