About "If.." in Scheme (plt-scheme)

Posted by Amit on Stack Overflow See other posts from Stack Overflow or by Amit
Published on 2009-07-17T15:44:29Z Indexed on 2010/06/08 21:22 UTC
Read the original article Hit count: 580

Filed under:
|
|
|

I had a pretty simple requirement in my Scheme program to execute more than one statement, in the true condition of a 'if'. . So I write my code, something like this:

(if (= 1 1)
 ((expression1) (expression2))  ; these 2 expressions are to be
executed when the condition is true
  (expression3) )

Obviously, the above doesn't work, since I have unintentionally created a # procedure with # arguments. So, to get my work done, I simply put the above expressions in a new function and call it from there, in place of the expression1, expression2. It works.

So, my point here is: is there any other conditional construct which may support my requirement here?

© Stack Overflow or respective owner

Related posts about lisp

Related posts about Scheme