Last active
January 31, 2020 09:25
-
-
Save you06/e44bd32c9b48bd52feaf50b73abdcc60 to your computer and use it in GitHub Desktop.
clojure "and" with variable will not calc lazy
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
(let [a (do (println "calc a") false) | |
b (do (println "calc b") false)] | |
(and a b) | |
(and (do (println "calc c") false) (do (println "calc d") false)) | |
) | |
; will print | |
; calc a | |
; calc b | |
; calc c | |
; false |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment