Using library functions, define a function halve :: [a ] → ([a ], [a ]) that splits an even-lengthed list into two halves. For example:
> halve [1, 2, 3, 4, 5, 6]
([1, 2, 3], [4, 5, 6])
so far what I have is
halve :: [a] -> ([a],[a])
halve = (\xs -> case xs of
[] -> ([],[])
xs -> take ((length xs) `div` 2 ) xs)
and it's wrong since xs -> take ((length x) div
2 ) xs only shows the first half of the list...please help me continue so that it will show the second half of the list.