Skip to content

Instantly share code, notes, and snippets.

@seven-phases-max
Last active October 10, 2016 13:54
Show Gist options
  • Select an option

  • Save seven-phases-max/2dcab428a50bd913f51088da643a045b to your computer and use it in GitHub Desktop.

Select an option

Save seven-phases-max/2dcab428a50bd913f51088da643a045b to your computer and use it in GitHub Desktop.
@classes: apple, pear, coconut, orange;
.make-chain(@classes);
.make-chain(@list, @i: 1)
when (@i <= length(@list)) {
@name: extract(@list, @i);
&:not(@{name}) {
.make-chain(@classes, @i + 1);
}
}
.make-chain(@list, @i)
when ((@i - 1) = length(@list)) {
foo: bar;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment