this is a function that takes a mininum of 2 arguments. when called, the extra arguments are combined into a list and bound to c
for full variadic functions, you can just leave off the parens:
(def sqnl args
(map [* _ _] args))
a really nifty thing is that the arguments are automatically destructured (dunno if that's the term.) for example, say you are using lists of two elements to represent points on a coordinate plane:
(= p1 (list 30 50)
p2 (list 20 80))
and say you want to make a function that multiplies the points by a scalar. you can do it like this:
(def scale (point s)
(list (* s (car point))
(* s (cadr point))))
so you're explicitly accessing the first (car) and second (cadr) parts of the list. but you can have the work done for you like so:
Just to add: if you want your function to take any number (including zero) arguments, then just use a symbol instead of an argument list, and all the arguments will be bound to that symbol.
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).