Without looking at the definitions from the standard prelude, define the following higher-order library functions on lists.
a. Decide if all elements of a list satisfy a predicate:
all :: $(a \rightarrow$ BOOl $) \rightarrow[\mathrm{BOOl}]->$ BOOl
b. Decide if any element of a list satisfies a predicate:
any $::(a \rightarrow$ BOOl $) \rightarrow[$ BOOl] $\rightarrow$ BOOL
c. Select elements from a list while they satisfy a predicate:
takeWhile :: (a $\rightarrow$ Bool $) \rightarrow[a] \rightarrow[a]$
d. Remove elements from a list while they satisfy a predicate:
dropWhile :: (a $\rightarrow$ Bool $) \rightarrow[a]->$ [a]
Note: in the prelude the first two of these functions are generic functions rather than being specific to the type of lists.