Created
January 19, 2018 18:25
-
-
Save rohitvvv/bf984178a922e65cfe5d450d63d40ffe to your computer and use it in GitHub Desktop.
Scary Fibonacci
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns overtone.core) | |
(use 'overtone.live) | |
(use 'overtone.inst.piano) | |
(defn fibn | |
"Find nth fibonacii number" | |
[n] | |
(loop [index 0 x 1 y 1] | |
(if (= index n) | |
y | |
(recur (inc index) y (+ x y))))) | |
(defn playsomething | |
[x] | |
(Thread/sleep 200) | |
(piano (mod x 130))) | |
(map playsomething (map fibn (range 0 500))) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment