mirror of
https://github.com/c-cube/ocaml-containers.git
synced 2025-12-07 03:35:30 -05:00
small changes to CCList
This commit is contained in:
parent
887d2f5d8d
commit
296cdc8748
1 changed files with 7 additions and 6 deletions
|
|
@ -400,15 +400,13 @@ let split l =
|
||||||
(x3, y3) ::
|
(x3, y3) ::
|
||||||
(x4, y4) ::
|
(x4, y4) ::
|
||||||
(x5, y5) :: l' ->
|
(x5, y5) :: l' ->
|
||||||
let rx, ry = direct (i-1) l'
|
let rx, ry = direct (i-1) l' in
|
||||||
in
|
x1 :: x2 :: x3 :: x4 :: x5 :: rx,
|
||||||
(x1 :: x2 :: x3 :: x4 :: x5 :: rx,
|
y1 :: y2 :: y3 :: y4 :: y5 :: ry
|
||||||
y1 :: y2 :: y3 :: y4 :: y5 :: ry)
|
|
||||||
and split_slow acc l = match l with
|
and split_slow acc l = match l with
|
||||||
| [] -> acc
|
| [] -> acc
|
||||||
| (x1, y1) :: l' ->
|
| (x1, y1) :: l' ->
|
||||||
let acc = (x1 :: fst acc, y1 :: snd acc)
|
let acc = x1 :: fst acc, y1 :: snd acc in
|
||||||
in
|
|
||||||
split_slow acc l'
|
split_slow acc l'
|
||||||
in
|
in
|
||||||
direct direct_depth_default_ l
|
direct direct_depth_default_ l
|
||||||
|
|
@ -427,6 +425,9 @@ let split l =
|
||||||
let l2_y = List.nth l2 i in \
|
let l2_y = List.nth l2 i in \
|
||||||
let (x,y) = List.nth l i in \
|
let (x,y) = List.nth l i in \
|
||||||
l1_x = x && l2_y = y)
|
l1_x = x && l2_y = y)
|
||||||
|
|
||||||
|
Q.(list (pair int int)) (fun l -> \
|
||||||
|
split l = List.split l)
|
||||||
*)
|
*)
|
||||||
|
|
||||||
let return x = [x]
|
let return x = [x]
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue