syntax - Scheme several actions if an if-statement proves true -


the way understand scheme if-statement first condition when if-statement true, , second statement when false. if want several conditions when statement proves true?

an example:

(if (= b)     (set! ([a 2]))  // shall happen when true     (set! ([b 4]))  // shall happen when true      (set! ([a b])) // shall happen when not true 

is possible that?

you can try use begin in if statement. so:

(if (something) (begin (foo)        (bar))) 

Comments

Popular posts from this blog

angularjs - Redirect to a new template in angular js -

Oracle SQL. How to select specific IDs where value of columns specify criteria? -

Desktop Launcher for Python Script Starts Program in Wrong Path (Linux) -