Am Freitag, 22. Februar 2008 15:22 schrieb TOPE KAREM:
> Thanks. My question is whether it can call a function (say map) previously
> defined elsewhere in the program. Same goes for filter.
>
> Tope

Like

oddlyMakeEven [] = []
oddlyMakeEven ks@(k:_) = if odd k then map (*2) ks else filter even ks

?
Sure, each branch can be an arbitrarily complex expression.

HTH,
Daniel
_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to