mirror of
https://github.com/vinc/moros.git
synced 2024-06-15 05:36:38 +00:00
* Update documentation * Add macro? * Rewrite and and or with macros * Move string-join * Update built-in autocompletion * Use define instead of def in core and examples * Add changelog to doc * Move aliases to lib * Add let macro * Add caar cadr cdar cddr functions * Add fixme * Fix let macro
9 lines
182 B
Plaintext
9 lines
182 B
Plaintext
(load "/lib/lisp/core.lsp")
|
|
|
|
(define (sum n acc)
|
|
(if (= n 0) acc (sum (- n 1) (+ n acc))))
|
|
|
|
(println
|
|
(if (nil? args) "Usage: sum <num>"
|
|
(sum (string->number (car args)) 0)))
|