clojure-hackos.fibonacci-numbers
Solves the Fibonacci Numbers challenge. See https://www.hackerrank.com/challenges/functional-programming-warmups-in-recursion---fibonacci-numbers/problem
fibonacci
(fibonacci k)
Returns the k
th number in the Fibonacci sequence.
Note positions are 1-indexed rather than 0-indexed, i.e.,
(fibonacci 1)
; => 0
(fibonacci 2)
; => 1