Skip to content

Instantly share code, notes, and snippets.

@jfo
Created March 5, 2014 22:02
Show Gist options
  • Save jfo/9377571 to your computer and use it in GitHub Desktop.
Save jfo/9377571 to your computer and use it in GitHub Desktop.
(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