Copying a snippet into HTML is where a documented language stops being the real one. Each block on the page is a program here with its recorded output beside it, and check.sh is what says the page is still true after a change.
12 lines
279 B
Plaintext
12 lines
279 B
Plaintext
(defn work [n i32] i32
|
|
(defer (print-line "second"))
|
|
(defer (print-line "first")) ; innermost-first at exit
|
|
(when (< n 0)
|
|
(return 0)) ; runs both defers above it
|
|
(print-line "body")
|
|
n)
|
|
|
|
(defn main []
|
|
(print-i64 (i64 (work 3)))
|
|
(newline))
|