Created
January 1, 2013 23:18
-
-
Save edlich/4430925 to your computer and use it in GitHub Desktop.
Create a cycle that will not be realized but has the index passed around...
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
(defn mycycle [mylist index] | |
(println "Habe " mylist "," index) | |
(println "Mycycle Element = " (nth mylist index)) | |
(read-line) | |
(if (>= index (dec (count mylist))) | |
(mycycle mylist 0) | |
(mycycle mylist (inc index)))) | |
(mycycle '(1 2 3 4 5 6) 0) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment