Q:

Partition using recursion

Trying to learn myself some haskell, I know about the function 
partition :: (a -> Bool) -> [a] -> ([a], [a])

would I be able to this using recursion rather than using the function. eg id have my own defined function
partition':: (a -> Bool) -> [a] -> ([a], [a])

which would use recursion

A:

Here's one recursive definition:
partition':: (a -> Bool) -> [a] -> ([a], [a])
partition' _ [] = ([],[])
partition' f (x:xs) | f x = (x:matched,notMatched)
                    | otherwise = (matched,x:notMatched)
                    where (matched,notMatched) = partition' f xs

