[Haskell-cafe] Re: Tips of Conditional Expression

TOPE KAREM topekarem at gmail.com
Fri Feb 22 11:18:23 EST 2008

Thank you all. I am satisfied with all your inputs.


On Fri, Feb 22, 2008 at 7:17 AM, Christian Maeder <Christian.Maeder at dfki.de>

> 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
> > <Christian.Maeder at dfki.de <mailto:Christian.Maeder at 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]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20080222/31f44b9e/attachment.htm

More information about the Haskell-Cafe mailing list