(let [[a b & c :as d] [1 2 3 4 5]]
(println a) ; 1
(println b) ; 2
(println c) ; (3 4 5)
d) ;[1 2 3 4 5]
Explicit multi-arity is strongly preferable to varargs style.
- You will get an error if you make a mistake and pass too many args rather than mysterious bad behavior.
- Later refactorings can proceed with confidence that there are no callers passing a bunch of extra ignored args.
- varargs results in a seq call plus destructuring - extra work that is slightly worse for performance.