Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@sibbl
Created March 22, 2013 11:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sibbl/5220571 to your computer and use it in GitHub Desktop.
Save sibbl/5220571 to your computer and use it in GitHub Desktop.
Fibonacci numbers with LESS css
.fibonacci(@maxIterations) {
.output(0);
.output(1);
.fibonacci(0,1, @maxIterations, 1);
}
.fibonacci (@a: 0; @b: 1, @maxIterations, @index) when (@index < @maxIterations) {
.output(@a + @b);
.fibonacci(@b, @a + @b, @maxIterations, @index+1);
}
.fibonacci(10);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment