Arc Forumnew | comments | leaders | submitlogin
1 point by krg 6052 days ago | link | parent

globalrev, this stuff confused me at first too.

So if you have (def foo (a b . c) ...stuff...) and you call (foo 1 2 3 4 5), a is bound to 1, b is bound to 2, and c is bound to the list (3 4 5).

And (def foo a ...stuff...) is just shorthand for (def foo ( . a) ...stuff...). So calling (foo 1 2 3) in this case means a is bound to the list (1 2 3).



3 points by almkglor 6052 days ago | link

> And (def foo a ...stuff...) is just shorthand for (def foo ( . a) ...stuff...).

Technically wrong: ( . a) is invalid syntax. However it does help to think of it that way.

-----