.mixin (...) { // matches 0-N arguments
.mixin () { // matches exactly 0 arguments
.mixin (@a: 1) { // matches 0-1 arguments
.mixin (@a: 1, ...) { // matches 0-N arguments
.mixin (@a, ...) { // matches 1-N arguments
Furthermore:
.mixin (@a, @rest...) {
// @rest is bound to arguments after @a
// @arguments is bound to all arguments
}
It's important to point out this is a breaking change from 1.2, as 1.2 doesn't enforce a maximum number of arguments you can pass, only a minimum. So
.mixin ()
would match0-N
arguments -- to get that behaviour now, we use(...)
, and()
means exactly zero.