This is why my repo's been unstable lately: it now has pervasive (python-inspired) keyword args. Observe: > (def foo(a b) (cons a b))
> (foo 3 4)
(3 . 4) ; expected
> (foo :b 3 4)
(4 . 3) ; whoa!
I've also changed the syntax for optional args: > (def foo(a ? b nil) (cons a b))
> (foo 3)
(3)
Optional args come after a '?' and must explicitly provide a default. (alternatives: https://arclanguage.org/item?id=12565)https://github.com/akkartik/arc I find the best documentation for this feature is test cases:
https://github.com/akkartik/arc/blob/fe966bb79c97714f3a186677711fb918eeda994d/ac.scm.t Let me know if anybody sees bugs or other issues. I've tested it on both news.arc and readwarp and everything seems to work. |