Skip to content

Instantly share code, notes, and snippets.

@you06
Last active January 31, 2020 09:25
Show Gist options
  • Save you06/e44bd32c9b48bd52feaf50b73abdcc60 to your computer and use it in GitHub Desktop.
Save you06/e44bd32c9b48bd52feaf50b73abdcc60 to your computer and use it in GitHub Desktop.
clojure "and" with variable will not calc lazy
(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