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

Java 3D LWJGL collision -

spring - SubProtocolWebSocketHandler - No handlers -

methods - python can't use function in submodule -