mirror of
https://github.com/c-cube/ocaml-containers.git
synced 2025-12-06 03:05:28 -05:00
update to qcheck 0.6
This commit is contained in:
parent
d659ba677e
commit
b2f8eb5b27
2 changed files with 10 additions and 9 deletions
|
|
@ -688,9 +688,9 @@ let take_while p l =
|
||||||
*)
|
*)
|
||||||
|
|
||||||
(*$Q
|
(*$Q
|
||||||
Q.(pair (fun1 small_int bool) (list small_int)) (fun (f,l) -> \
|
Q.(pair (fun1 Observable.int bool) (list small_int)) (fun (f,l) -> \
|
||||||
let l1 = take_while f l in \
|
let l1 = take_while (Q.Fn.apply f) l in \
|
||||||
List.for_all f l1)
|
List.for_all (Q.Fn.apply f) l1)
|
||||||
*)
|
*)
|
||||||
|
|
||||||
let rec drop_while p l = match l with
|
let rec drop_while p l = match l with
|
||||||
|
|
@ -698,8 +698,8 @@ let rec drop_while p l = match l with
|
||||||
| x :: l' -> if p x then drop_while p l' else l
|
| x :: l' -> if p x then drop_while p l' else l
|
||||||
|
|
||||||
(*$Q
|
(*$Q
|
||||||
Q.(pair (fun1 small_int bool) (list small_int)) (fun (f,l) -> \
|
Q.(pair (fun1 Observable.int bool) (list small_int)) (fun (f,l) -> \
|
||||||
take_while f l @ drop_while f l = l)
|
take_while (Q.Fn.apply f) l @ drop_while (Q.Fn.apply f) l = l)
|
||||||
*)
|
*)
|
||||||
|
|
||||||
let take_drop_while p l =
|
let take_drop_while p l =
|
||||||
|
|
@ -720,9 +720,9 @@ let take_drop_while p l =
|
||||||
direct direct_depth_default_ p l
|
direct direct_depth_default_ p l
|
||||||
|
|
||||||
(*$Q
|
(*$Q
|
||||||
Q.(pair (fun1 small_int bool) (list small_int)) (fun (f,l) -> \
|
Q.(pair (fun1 Observable.int bool) (list small_int)) (fun (f,l) -> \
|
||||||
let l1,l2 = take_drop_while f l in \
|
let l1,l2 = take_drop_while (Q.Fn.apply f) l in \
|
||||||
(l1 = take_while f l) && (l2 = drop_while f l))
|
(l1 = take_while (Q.Fn.apply f) l) && (l2 = drop_while (Q.Fn.apply f) l))
|
||||||
*)
|
*)
|
||||||
|
|
||||||
let last n l =
|
let last n l =
|
||||||
|
|
|
||||||
|
|
@ -151,7 +151,8 @@ let mapi ~f l =
|
||||||
*)
|
*)
|
||||||
|
|
||||||
(*$Q
|
(*$Q
|
||||||
Q.(pair (list small_int)(fun2 int int bool)) (fun (l,f) -> \
|
Q.(pair (list small_int)(fun2 Observable.int Observable.int bool)) (fun (l,f) -> \
|
||||||
|
let f = Q.Fn.apply f in \
|
||||||
mapi ~f (of_list l) |> to_list = List.mapi f l )
|
mapi ~f (of_list l) |> to_list = List.mapi f l )
|
||||||
*)
|
*)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue