
16 Sep
2013
16 Sep
'13
3:33 p.m.
Le 16 sept. 2013 19:35, "Florian Lammel"
splitInHalf :: [a] -> ([a], [a]) splitInHalf [] = ([], []) splitInHalf [x] = ([x], []) splitInHalf (x:y:xys) = (x:xs, y:ys) where (xs, ys) = splitInHalf xys
Try the following :
where ~(xs, ys) = splitInHalf xys
And let us know if that help. -- Chaddaï