Thank you all. I am satisfied with all your inputs.
Tope
TOPE KAREM wrote:I'm still not sure what to answer. If map and filter were user defined
> Thanks. My question is whether it can call a function (say map)
> previously defined elsewhere in the program. Same goes for filter.
functions they may occur anywhere in your current module (or must be
imported) and you can apply any argument in scope (of proper type).
You could i.e. apply "(if <cond> then map else filter)" to "id"
which is the same as "if <cond> then map id else filter id"
C.
> On Fri, Feb 22, 2008 at 6:04 AM, Christian Maeder
> <Christian.Maeder@dfki.de <mailto:Christian.Maeder@dfki.de>> wrote:
> I'm not sure what you're asking, but exp1 and exp2 may have (the same)
> function type:
>
> if <cond> then map else filter :: (Bool -> Bool) -> [Bool] -> [Bool]