Fork me on GitHub
#beginners
<
2017-07-24
>
jeeq07:07:17

I came across a line in a book (web dev with clojure) where (-> #‘handler wrap-something wrap-another) I’m wondering what’s going on

dominicm10:07:45

(def a 10)

(def b #'a)
(def c a)

;; redefine a, imagine you ran this at the repl
(def a 20)

(println "a: " a)
;; => 20
;; the new value
(println "b: " @b)
;; => 20
;; the new value, even though it was defined _before_ the new value was given to `a`, this is because vars are like references
(println "c: " c)
;; => 10
;; this is because it was defined based on the _value_ of a.
I put this together for you 🙂. You can copy it into https://app.klipse.tech to play around with it.

delaguardo08:07:21

#'x => (var x) you can get more information about var here - https://clojure.org/reference/special_forms, in one sentence - #'foo must be resolved to var (not a value) of foo with metadata.

jeeq08:07:07

@delaguardo Thank you very much

qle-guen10:07:50

hi, (require [instaparse.core :as insta]) throws FileNotFoundException in my test file (lein tests) but not in my source files, why?

qle-guen10:07:52

btw I'm loading the test file with cider-load-buffer

foamdino11:07:50

hi I'm having an issue using amazonica.aws.s3transfer to download-directory

foamdino11:07:06

Could not determine best method to invoke for download-directory using arguments

foamdino11:07:27

any ideas how I could debug this one?

foamdino11:07:47

I realize that this is more of a user->library issue