Thanks. My question is whether it can call a function (say map) previously defined elsewhere in the program. Same goes for filter.<br><br>Tope <br><br><div class="gmail_quote">On Fri, Feb 22, 2008 at 6:04 AM, Christian Maeder <<a href="mailto:Christian.Maeder@dfki.de">Christian.Maeder@dfki.de</a>> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><div></div><div class="Wj3C7c">TOPE KAREM wrote:<br>
> I know the following:<br>
><br>
> [1] That the general form of conditional expression is: if<br>
> *Boolean_expression* then /exp1/ else /exp2<br>
> /[2] That a conditional expression must always have both a then and an<br>
> else expression.<br>
> [3] That both /exp1/ and /exp2/ must have the same type, which is the<br>
> type of the entire conditional expression.<br>
> [4] That /exp1/ must be <true-value> and /exp2/ must be <false-value><br>
><br>
> Reference: Discrete Mathematics Using Computer by John O'Donnell and et<br>
> al. (Second Edition)<br>
><br>
> My question: Is it possible that exp1 and exp 2 be different function<br>
> calls of another functions (separately) elsewhere within the same program?<br>
> Note: My Boolean_expression is Boolean<br>
> My /exp1/ is a function call elsewhere within the same program<br>
> (more like a subroutine)<br>
> My /exp2/ is another function call also elsewhere within the<br>
> same program.<br>
<br>
</div></div>I'm not sure what you're asking, but exp1 and exp2 may have (the same)<br>
function type:<br>
<br>
if <cond> then map else filter :: (Bool -> Bool) -> [Bool] -> [Bool]<br>
<br>
HTH Christian<br>
</blockquote></div><br>