Last active
November 12, 2015 23:37
-
-
Save skatenerd/56719ce2d758f562c9ac to your computer and use it in GitHub Desktop.
lazy
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
user=> (def zing (map (fn [x] (if (= x 100) (/ 1 0) x)) (range 1000))) | |
#'user/zing | |
user=> (first zing) | |
0 | |
user=> (nth zing 5) | |
5 | |
user=> (nth zing 999) | |
ArithmeticException Divide by zero clojure.lang.Numbers.divide (Numbers.java:156) |
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
user=> (def zing (map (fn [x] (if (= x 2) (/ 1 0) x)) (range 10))) | |
#'user/zing | |
user=> (first zing) | |
ArithmeticException Divide by zero clojure.lang.Numbers.divide (Numbers.java:156) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment