Re:A Lisp interpeter in a thousand lines of Bash
by wooby on Tuesday January 14, 2014 @02:04PM
(#7058976)
Yes, the arithmetic primitives don't support variadic arguments. You can see how + works - and that it only deals with the first two arguments - here: https://github.com/alandipert/gherkin/blob/278354246aebf14b8.... A pull request fixing this would be welcome.
In the meantime, for variadic addition, one can do:
In the meantime, for variadic addition, one can do:
(load-file "core.gk") (reduce + 0 '(1 2 3)) ;=> 6