Created
July 1, 2019 20:49
-
-
Save hierophantos/8407bd8fd825c8d5913a7e5baf034747 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
(declare _logistic-rec) | |
(defn logistic-rec [x r n] | |
(_logistic-rec x r n [])) | |
(defn _logistic-rec [x r n acc] | |
(if (= n 0) acc | |
(let [new-x (* r x (- 1 x))] | |
(_logistic-rec new-x r (dec n) (conj acc x))))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment