Skip to content

Instantly share code, notes, and snippets.

@EteimZ
Last active August 20, 2022 10:12
Show Gist options
  • Select an option

  • Save EteimZ/a5681fcc2099d65066b2c106a839105d to your computer and use it in GitHub Desktop.

Select an option

Save EteimZ/a5681fcc2099d65066b2c106a839105d to your computer and use it in GitHub Desktop.
The gist contains snippets of rambda.js code.
const R = require("rambda");
// Get the nth fibonacci number
const nthFib = R.cond([
[R.equals(1), R.always(1)],
[R.equals(2), R.always(1)],
[R.T, n => nthFib(n-1) + nthFib(n-2)]
]);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment