git » homepage.git » master » tree

[master] / archive / forums / hacker-news / raw / items / 7058976.json

{"by":"wooby","id":7058976,"parent":7054720,"text":"Yes, the arithmetic primitives don&#x27;t support variadic arguments.  You can see how + works - and that it only deals with the first two arguments - here: <a href=\"https://github.com/alandipert/gherkin/blob/278354246aebf14b86e05c726cb7a4db31658f56/gherkin#L914\" rel=\"nofollow\">https:&#x2F;&#x2F;github.com&#x2F;alandipert&#x2F;gherkin&#x2F;blob&#x2F;278354246aebf14b8...</a>.  A pull request fixing this would be welcome.<p>In the meantime, for variadic addition, one can do:<p>(load-file &quot;core.gk&quot;)\n(reduce + 0 &#x27;(1 2 3)) ;=&gt; 6","time":1389726261,"type":"comment"}