From 6b48fe873eb08ecf0ba0747bf9dacc1d6ecde2a9 Mon Sep 17 00:00:00 2001 From: Simon Cruanes Date: Sun, 4 Feb 2018 12:05:58 -0600 Subject: [PATCH] add another test --- src/core/CCList.ml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/core/CCList.ml b/src/core/CCList.ml index acbcc57b..20e9c77d 100644 --- a/src/core/CCList.ml +++ b/src/core/CCList.ml @@ -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