mirror of
https://github.com/c-cube/ocaml-containers.git
synced 2025-12-06 11:15:31 -05:00
reindent
This commit is contained in:
parent
7510aaaa18
commit
b3c796176d
6 changed files with 17 additions and 17 deletions
|
|
@ -1265,7 +1265,7 @@ let replicate i x =
|
||||||
Q.(pair small_int (small_list int)) (fun (n,l) -> \
|
Q.(pair small_int (small_list int)) (fun (n,l) -> \
|
||||||
if n>0 then repeat n l = flat_map (fun _ -> l) (1--n) \
|
if n>0 then repeat n l = flat_map (fun _ -> l) (1--n) \
|
||||||
else Q.assume_fail())
|
else Q.assume_fail())
|
||||||
*)
|
*)
|
||||||
|
|
||||||
let repeat i l =
|
let repeat i l =
|
||||||
let rec aux acc i =
|
let rec aux acc i =
|
||||||
|
|
|
||||||
|
|
@ -262,7 +262,7 @@ let flat_map f l =
|
||||||
let f x = Q.Fn.apply f x in \
|
let f x = Q.Fn.apply f x in \
|
||||||
let f' x = f x |> of_list in \
|
let f' x = f x |> of_list in \
|
||||||
of_list l |> flat_map f' |> to_list = CCList.(flat_map f l))
|
of_list l |> flat_map f' |> to_list = CCList.(flat_map f l))
|
||||||
*)
|
*)
|
||||||
|
|
||||||
let flatten l = fold_rev ~f:(fun acc l -> append l acc) ~x:empty l
|
let flatten l = fold_rev ~f:(fun acc l -> append l acc) ~x:empty l
|
||||||
|
|
||||||
|
|
@ -274,7 +274,7 @@ let flatten l = fold_rev ~f:(fun acc l -> append l acc) ~x:empty l
|
||||||
(*$Q
|
(*$Q
|
||||||
Q.(small_list (small_list int)) (fun l -> \
|
Q.(small_list (small_list int)) (fun l -> \
|
||||||
of_list l |> map ~f:of_list |> flatten |> to_list = CCList.flatten l)
|
of_list l |> map ~f:of_list |> flatten |> to_list = CCList.flatten l)
|
||||||
*)
|
*)
|
||||||
|
|
||||||
let app funs l =
|
let app funs l =
|
||||||
fold_rev ~x:empty funs
|
fold_rev ~x:empty funs
|
||||||
|
|
@ -452,7 +452,7 @@ let repeat n l =
|
||||||
(*$Q
|
(*$Q
|
||||||
Q.(pair small_int (list int)) (fun (n,l) -> \
|
Q.(pair small_int (list int)) (fun (n,l) -> \
|
||||||
of_list l |> repeat n |> to_list = CCList.(repeat n l))
|
of_list l |> repeat n |> to_list = CCList.(repeat n l))
|
||||||
*)
|
*)
|
||||||
|
|
||||||
let range i j =
|
let range i j =
|
||||||
let rec aux i j acc =
|
let rec aux i j acc =
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue