--the list of results given by applying fs to x applyAll = \fs -> \x -> map (\f -> f x) fs --the list of elements that don't satisfy p remove = \p -> \xs -> filter (\x -> not (p x)) xs --the number of times x appears in xs count = \x -> \xs -> foldr (\y -> \n -> n + (if x == y then 1 else 0)) 0 xs --the biggest number in a list max = foldr (\a -> \b -> if a>b then a else b) (-999) --the list of everything in xs followed by ys append =\xs -> \ys -> foldr (\x -> \zs -> x:zs) ys xs