
22 Feb
2008
22 Feb
'08
10:17 a.m.
TOPE KAREM wrote:
Thanks. My question is whether it can call a function (say map) previously defined elsewhere in the program. Same goes for filter.
I'm still not sure what to answer. If map and filter were user defined 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
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]