-
-
Save pjstadig/202c82d3e9a3fb32bd5a to your computer and use it in GitHub Desktop.
Reproduction case for loop destructuring holding head of sequence. Am I doing it wrong?
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
user=> (loop [xs (repeatedly 200 #(byte-array (quot (.maxMemory (Runtime/getRuntime)) 10)))] (when (seq xs) (recur (rest xs)))) | |
nil | |
user=> (loop [[x & xs] (repeatedly 200 #(byte-array (quot (.maxMemory (Runtime/getRuntime)) 10)))] (when (seq xs) (recur xs))) | |
OutOfMemoryError Java heap space clojure.lang.Numbers.byte_array (Numbers.java:1252) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment