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.
9 lines
308 B
Plaintext
9 lines
308 B
Plaintext
(defn main [] i32
|
|
(let [n 40 ; i32, inferred
|
|
big (i64 n) ; every widening is written
|
|
x 1.5] ; f64
|
|
(print-i64 (+ big 2)) (newline)
|
|
(print-f64 (* x 2.5)) (newline)
|
|
(print-i64 (i64 (bit-xor (<< 1 8) 255))) (newline)
|
|
0))
|