Funktionen höherer Ordnung

odd :: Int -> Boolean
odd 1 = True ; odd 5 = True ; odd 2 = False

filter odd [1,5,2,7,4,5,9] = [1,5,7,5,9]
Typ von filter?

filter :: (a -> Bool) -> [a] -> [a]
ist zweistellige Funktion, erstes Argument ist selbst eine Funktion.

partition odd [1,5,2,7,4,5,9]
  = ( [1,5,7,5,9], [2,4] )
Typ von partition?



Johannes Waldmann 2006-06-22