;; The spike's input. Ordinary Flan, run through the ordinary frontend -- ;; Reader, Parse, Load, Check -- so that what the emitter below lowers is the ;; same Tast.fn the LLVM backend gets and not a literal someone typed to make ;; the exercise come out. (defn spike-add [a i64 b i64] i64 (+ a b)) (defn spike-arith [a i64 b i64] i64 (- (* a 3) (+ b 7))) (defn spike-let [a i64] i64 (let [x (* a a) y (+ x 1)] (* x y))) (defn spike-if [a i64 b i64] i64 (if (< a b) (- b a) (- a b))) (defn spike-calls [a i64] i64 (spike-add (spike-arith a 2) (spike-let a))) (defn main [] i32 0)