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.
5 lines
225 B
Plaintext
5 lines
225 B
Plaintext
;; A second file in the same directory shares one top-level scope: it does not
|
|
;; import vec.flan, and the order of the two files does not matter.
|
|
(defn length [v V2] f32
|
|
(sqrt-f32 (+ (* (.x v) (.x v)) (* (.y v) (.y v)))))
|