lib.ecal 170 B

1234567891011
  1. # Library for fib
  2. /*
  3. fib calculates the fibonacci series using recursion.
  4. */
  5. func fib(n) {
  6. if (n <= 1) {
  7. return n
  8. }
  9. return fib(n-1) + fib(n-2)
  10. }