10
0
mirror of https://github.com/LCPQ/quantum_package synced 2024-11-08 07:03:57 +01:00
quantum_package/ocaml/Qputils.ml

15 lines
289 B
OCaml
Raw Normal View History

2014-08-26 15:31:16 +02:00
let (/) (a:string) (b:string) = a^"/"^b;;
2014-08-27 16:38:13 +02:00
2014-09-18 17:01:43 +02:00
let rec transpose = function
| [] -> []
| []::tail -> transpose tail
| (x::t1)::t2 ->
let new_head = (x::(List.map List.hd t2))
and new_tail = (transpose (t1 :: (List.map List.tl t2) ))
in
new_head @ new_tail
;;
2014-08-27 16:38:13 +02:00
2014-09-17 11:49:00 +02:00