mirror of
https://github.com/kanaka/mal.git
synced 2024-11-10 12:47:45 +03:00
dca6b58578
- Remove most of the step5 excludes in the Makefile except for ones which don't have TCO capability at all (or the implementation is too slow): bash, make, mal, matlab. - Make perf_EXCLUDES consistent with other excludes. - Add a print-FOO target which prints the resolved value of Makefile variable FOO. For example, `make print-IMPLS` to print the list of implementations.
16 lines
330 B
Plaintext
16 lines
330 B
Plaintext
;; Test recursive non-tail call function
|
|
|
|
(def! sum-to (fn* (n) (if (= n 0) 0 (+ n (sum-to (- n 1))))))
|
|
|
|
(sum-to 10)
|
|
;=>55
|
|
|
|
;;; no try* yet, so test completion of side-effects
|
|
(def! res1 nil)
|
|
;=>nil
|
|
;;; For implementations without their own TCO this should fail and
|
|
;;; leave res1 unchanged
|
|
(def! res1 (sum-to 10000))
|
|
res1
|
|
;=>nil
|