KiwiLang is a Lisp-like programming language written in Python.
Kiwilang is modular, allowing you write the syntax in JSON or KiwiLang's own, lisp-like syntax.
python main.py examples/hello.json [-v] [-d] [-r] [-p]python main.py examples/hello.klsp -c [-v] [-d] [-r] [-p]-vor--verbose- verbose output-dor--debug- debug output-ror--repl- run in interactive mode-por--performance- enable performance metrics-cor--compile- use KiwiLang's compiler
[
["print", "Hello, World!"],
["defn", ":x", 2],
["print", ":x"],
["defn", ":my_list", ["list", 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]],
["print", ":my_list"],
["defn", ":y", 2],
["if", ["=", ":y", 2],
["print", "y is 2"],
["print", "y is not 2"]
],
["print", ["range", 1, 10]],
["for-each", "$i", ["range", 1, 10], ["print", "$i"]],
["defn", ":test", ["lambda", ["$x"], ["print", "$x"]]],
[":test", "Hello, test function!"]
](defn :x 2)
(print :x)
(defn :my_list (list 1 2 3 4 5 6 7 8 9 10))
(print :my_list)
(defn :y 2)
(if (= :y 2)
(print "y is 2")
(print "y is not 2"))
(print (range 1 10))
(for-each $i (range 1 10) (print $i))
(defn :test (lambda ($x) (print $x)))
(:test "Hello, test function!")- Variables
- Lambda functions
- Control flow
- Loops
- Lists