@function slice($list, $start, $end: length($list)) {
  $new_list: ();
  @for $i from $start through $end {
    $new_list: append($new_list, nth($list, $i));
  }
  @return $new_list;
}

@function slice2($list, $start, $end: length($list)) {
  $new_list: ();
  $i: $start;
  @while $i <= $end {
    $new_list: append($new_list, nth($list, $i));
    $i: $i + 1;
  }
  @return $new_list;
}

@mixin slice3($list, $start, $end: length($list)) {
  $new_list: ();
  $i: $start;
  @while $i <= $end {
    $new_list: append($new_list, nth($list, $i));
    $i: $i + 1;
  }
  thing: $new_list;
}

@mixin slice4($list, $start, $end: length($list)) {
  $new_list: ();
  @for $i from $start through $end {
    $new_list: append($new_list, nth($list, $i));
  }
  thing: $new_list;
}


div {
  //@include slice3(a b c d e f, 2, 4);
  //@include slice4(a b c d e f, 2, 4);
  //bar: slice2(a b c d e f, 2, 4);
  foo: slice(a b c d e f, 2, 4);
}