The programming language for dark mages.
- Atoms (e.g.
42
,x
) - Arrays (e.g.
(x y z)
) - Comments (e.g.
; This is a comment.
)
- Symbols (e.g.
42
,x
) - Arrays (e.g.
(x y z)
)
(get xs 0) ; -> 42
(set xs 1 42) ; -> (1 42 3)
(len xs) ; -> 42
(= 0 ()) ; -> 1
(= 0 0) ; -> 1
(= 0 1) ; -> 0
(if
condition-1 then-body-1
condition-2 then-body-2
else-body)
(let foo 42)
(let-rec foo (fn () (foo)))
(let-rec
foo (fn () (bar))
bar (fn () (foo)))
(fn (x y) (+ x y))
(macro (foo x y) `(let ,x ,y))
- Quasi-quotation
`(foo bar) ; -> (foo bar)
(quote (foo bar)) ; -> (foo bar)
,foo ; -> 42
(unquote foo) ; -> 42
where foo
is 42
.
(use "path/to/module.arc")