Last active
August 29, 2015 14:16
-
-
Save alexandre/02f08da58cc46f3625e0 to your computer and use it in GitHub Desktop.
testando recursão e avaliação preguiçosa...se é que eu entendi...
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
| (comment | |
| Tentando onseguir o mesmo resultado em clojure: | |
| #Python3 | |
| >>> x = [1, 2, 3] | |
| >>> x.append(x) | |
| >>> x[3][3][3] == x | |
| True | |
| ) | |
| user=> (def x (list 1 2 3)) | |
| #'user/x | |
| user=> x | |
| (1 2 3) | |
| user=> (nth x 2) | |
| 3 | |
| user=> (concat x x) | |
| (1 2 3 1 2 3) | |
| user=> x | |
| (1 2 3) | |
| user=> (def x (concat x x)) | |
| #'user/x | |
| user=> (= x (nth x 3)) | |
| false | |
| user=> x | |
| (1 2 3 1 2 3) | |
| user=> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment