flan/web/examples/numbers.flan
Joseph Ferano dfd64d89ea The examples are files that run, not prose, so the page cannot drift from them
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.
2026-09-12 03:40:03 +07:00

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))