This is a forked version of the lisp implementation Urn.
Kevin "The Nuclear" Bloom c53eb699eb maybe-map -> filter-map | пре 4 година | |
---|---|---|
bin | пре 4 година | |
git | пре 4 година | |
lib | пре 4 година | |
plugins | пре 4 година | |
tests | пре 4 година | |
urn | пре 4 година | |
LICENCE | пре 4 година | |
Makefile | пре 4 година | |
PKGBUILD | пре 4 година | |
README.md | пре 4 година | |
default.nix | пре 4 година | |
urn-scm-1.rockspec | пре 4 година |
Urn is a new language developed by SquidDev, and demhydraz. Urn is a Lisp dialect with a focus on minimalism which compiles to Lua.
¹: Minimalism is an implementation detail.
> (case '("x" (foo 2 3)) . [(string? @ ?x) (.. "Got a string " x)] . [("x" (foo . ?x)) (.. "Got some remaining values " (pretty x))]) out = "Got some remaining values (2 3)"
> (loop [(o '()) . (l '(1 2 3))] . [(empty? l) o] . (recur (cons (car l) o) (cdr l))) out = (3 2 1)
> (import test ()) out = nil > (affirm (eq? '("foo" "bar" "") . (string/split "foo-bar" "-"))) [ERROR] <stdin>:1 (compile#111{split,temp}:46): Assertion failed (eq? (quote ("foo" "bar" "")) (string/split "foo-bar" "-")) | | | ("foo" "bar") ("foo" "bar" "")
> { :foo 1 . :bar 2 } out = {"bar" 2 "foo" 1}
> (] [ERROR] Expected ')', got ']' => <stdin>:[1:2 .. 1:2] ("]") 1 │ (] │ ^... block opened with '(' 1 │ (] │ ^ ']' used here >
We have a getting started guide to help you get set up. Or you can clone the repo and jump right in!
The website also contains documentation for all functions and macros, should you need to check how something works.
If you have any questions, would like to contribute or just feel like chatting, do join us in the #urn
channel on FreeNode.