I\'m trying to make a recursive function to get the transpose of a list of lists, n x p to p x n. But i\'m unable to do so. I\'ve been able to make
n x p
p x n
let rec transpose list = match list with | [] -> [] | [] :: xss -> transpose xss | (x::xs) :: xss -> (x :: List.map List.hd xss) :: transpose (xs :: List.map List.tl xss)