mirror of
https://github.com/c-cube/iter.git
synced 2025-12-06 03:05:29 -05:00
Add tests.
This commit is contained in:
parent
daa34efd62
commit
2cd8b8fa13
1 changed files with 8 additions and 0 deletions
|
|
@ -1321,6 +1321,14 @@ let sample k seq =
|
|||
if !i < k then Array.sub a 0 (!i + 1)
|
||||
else a
|
||||
|
||||
(*$QR
|
||||
Q.(pair (list int) (1 -- 20)) (fun (l, n) ->
|
||||
let seq = of_list l in
|
||||
let a = sample n seq in
|
||||
(Array.for_all (fun x -> exists ((=) x) seq) a)
|
||||
&& (Array.length a = Pervasives.min (length seq) n) )
|
||||
*)
|
||||
|
||||
(** {2 Infix functions} *)
|
||||
|
||||
module Infix = struct
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue