Conditional structures: Difference between revisions

Content added Content deleted
Line 289: Line 289:
5) ; when x is logical true, prints "hello world" and returns 5; otherwise does nothing, returns nil
5) ; when x is logical true, prints "hello world" and returns 5; otherwise does nothing, returns nil
</lang>
</lang>

===case===
<lang lisp>
(case 2
0 (println "0")
1 (println "1")
2 (println "2")) ; prints 2.</lang>


===cond===
===cond===