Closed fcard closed 6 years ago
This PR introduces rest (or vararg) arguments that allows one to collect a variable number of arguments into an array:
rest
vararg
f(a b @c) echo $c[@] f 1 2 3 4 #> 3 4 k(-- x y @z) echo $z[@] ${z:keys} k -x 1 -y 2 -a 3 -b 4 -c 5 #> 3 4 5 a b c
cool this is really handy to pass optional arguments
This PR introduces
rest
(orvararg
) arguments that allows one to collect a variable number of arguments into an array: