The way I understand a scheme if-statement is that the first condition is when the if-statement is true, and the second statement is when it is false. What if I want several conditions for when the statement proves true?
An example:
(if (= a b)
(set! ([a 2])) // This shall happen when true
(set! ([b 4])) // This shall happen when true
(set! ([a b])) // This shall happen when NOT true
Is it possible to do something like that?
Aucun commentaire:
Enregistrer un commentaire