Übungen: take/dropWhile

import Prelude 
    hiding ( takeWhile, dropWhile )

takeWhile :: (a -> Bool) -> [a] -> [a]
-- takeWhile odd [1,3,5,6,7,8] = [1,3,5]
takeWhile p [] = ???
takeWhile p (x : xs) = 
    if p x then ???
           else ???

dropWhile :: (a -> Bool) -> [a] -> [a]
-- dropWhile odd [1,3,5,6,7,8] = [6,7,8]
???



Johannes Waldmann 2004-11-30