t-or.scm 576 B

123456789101112131415161718192021222324252627282930
  1. ;; all the different permutations of or
  2. (list
  3. ;; not in tail position, no args
  4. (or)
  5. ;; not in tail position, one arg
  6. (or 'what)
  7. (or #f)
  8. ;; not in tail position, two arg
  9. (or 'what 'where)
  10. (or #f 'where)
  11. (or #f #f)
  12. (or 'what #f)
  13. ;; not in tail position, value discarded
  14. (begin (or 'what (error "two")) 'two)
  15. ;; in tail position (within the lambdas)
  16. ((lambda ()
  17. (or)))
  18. ((lambda ()
  19. (or 'what)))
  20. ((lambda ()
  21. (or #f)))
  22. ((lambda ()
  23. (or 'what 'where)))
  24. ((lambda ()
  25. (or #f 'where)))
  26. ((lambda ()
  27. (or #f #f)))
  28. ((lambda ()
  29. (or 'what #f))))