Created
March 5, 2014 22:02
-
-
Save jfo/9377571 to your computer and use it in GitHub Desktop.
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 enclojure.equal) | |
(defn lower [note] | |
(if (< note 20.0) | |
note | |
(lower (/ note 2)))) | |
(defn equaltemp [a acc] | |
(if (> a 20000.0) | |
acc | |
(equaltemp (* a (Math/pow 2.0 (/ 1.0 12.0))) (cons a acc)))) | |
(reverse (equaltemp (lower 440.0) (list))) | |
(count (reverse (equaltemp (lower 440.0) (list)))) | |
(defn just [a acc] | |
(if (> a 20000.0) | |
acc | |
(just (* a (/ 256.0 243.0)) (cons a acc)))) | |
(reverse (just (lower 440.0) (list))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment