controlflow.glisp 516 B

12345678910111213141516171819202122232425262728
  1. (assert (not (and false false)))
  2. (assert (not (and true false)))
  3. (assert (not (and false true)))
  4. (assert (and true true))
  5. (assert (= 0 (and 1 0)))
  6. (assert (= 0 (and 0 1)))
  7. (assert (= 2 (and 1 2)))
  8. (assert (not (or false false)))
  9. (assert (or false true))
  10. (assert (or true false))
  11. (assert (or true true))
  12. (assert (= 1 (or 0 1)))
  13. (assert (= 1 (or 1 0)))
  14. (assert (= 1 (or 1 2)))
  15. (assert (= 'a
  16. (cond true 'a 'b)))
  17. (assert (= 'b
  18. (cond false 'a 'b)))
  19. (assert (= 'c
  20. (cond
  21. false 'a
  22. false 'b
  23. 'c)))