87d6028487
- Reader: maps, sets, syntax-quote, dispatch macros, metadata - Runtime: CljVal type system, 80+ core functions (collections, strings, math, IO) - Emitter: full CljVal-based code generation, macro expansion, inline fns - Macros: defmacro with compile-time evaluator, ->, ->>, and, or, when, cond, for, doseq - Nim Interop: nim/module/function syntax, auto-import, type mapping - CLI: cljnim -e '<code>' for quick evaluation - Tests: 60 unit tests (reader + emitter) - Benchmarks: AOT suite showing 543x startup, 679x factorial vs JVM Clojure - CI: GitLab CI pipeline - Runtime library: lib/cljnim_runtime.nim (1070+ lines)
9 lines
162 B
Clojure
9 lines
162 B
Clojure
(defn square [x]
|
|
(* x x))
|
|
|
|
(def numbers [1 2 3 4 5])
|
|
|
|
(println (map square numbers))
|
|
(println (filter (fn [x] (> x 2)) numbers))
|
|
(println (reduce + 0 numbers))
|