@function test($args...) {
  $all: ();

  @each $arg in $args {
    $all: append($all, $arg);
  }

  @return inspect($all);
}

test {
  args-1: test(1 2 3);
  args-2: test(1 2, 3 4);
  args-3: test(1, 2, 3);
}
