Skip to content

Instantly share code, notes, and snippets.

@heapwolf
Created May 15, 2019 21:08
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save heapwolf/67472bd86bed6d09da5f6de49e4ca19b to your computer and use it in GitHub Desktop.
Save heapwolf/67472bd86bed6d09da5f6de49e4ca19b to your computer and use it in GitHub Desktop.
auto fib = [&](auto&& fib, int n) {
if (n < 3) {
return 1;
}
return fib(fib, n - 1) + fib(fib, n - 2);
};
fib(fib, 45);
@deviskipkoechrono
Copy link

1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment