1 module Lp_informal_computations = struct
3 let take n = fst o chop_list n;;
4 let drop n = snd o chop_list n;;
9 | x::xss -> rotateL ((i-1) mod length xs) (xss @ [x])
12 let rotateR i = rotateL (-i);;
20 | h1 :: h2 :: t -> (h1,h2) :: pairs (h2 :: t) in
24 let split_list list dart =
29 let t3, _ = chop_list 3 f in
30 let _, d2 = chop_list 2 f in
37 let pairs = list_pairs f in
38 if mem dart pairs then
39 let i = index dart pairs in
40 split_face (rotateR 1 (rotateL i f)) @ t