Fork me on GitHub
#beginners
<
2019-03-06
>
piyer00:03:49

(let [[a b]
                          (list "a" "b")
                          foo "asdf"]
                      (string/join "_" '(a b foo)))
=> “a_b_foo”
(let [[a b]
                          (list "a" "b")
                          foo "asdf"]
                      (string/join "_" (list a b foo)))
=> “a_b_asdf” why is that?

piyer00:03:29

'(a b foo) is not evaluated

lilactown00:03:49

@munichlinux a quote tells Clojure not to evaluate anything in the form that follows

lilactown00:03:31

(let [foo "asdf"]
  'foo)
;; => foo

(let [foo "asdf"]
  foo)
;; => "asdf"

piyer00:03:00

@lilactown ah, I got that wrong