This is caused by lazyness – map
returns a lazy sequence which is defined inside the binding but is evaluated outside. You need to force the evaluation from inside:
(binding [*out-dir* "/home/dave"]
(doall (map #(str *out-dir* %) [1 2 3])))
More Related Contents:
- Clojure – Combining Two vectors into a vector of vectors [duplicate]
- Why exactly is eval evil?
- What is the difference between Lisp-1 and Lisp-2?
- How to handle java variable length arguments in clojure?
- Difference between doseq and for in Clojure
- conda, condi, conde, condu
- Clojure: reduce vs. apply
- What is zip (functional programming?)
- Idiomatic clojure map lookup by keyword
- Matrix transposition in clojure
- difference between use and require
- How do I avoid Clojure’s chunking behavior for lazy seqs that I want to short circuit?
- How do I find the index of an item in a vector?
- What do Clojure symbols do when used as functions?
- How to convert lazy sequence to non-lazy in Clojure
- How to list the functions of a namespace?
- Producer consumer with qualifications
- Wrong number of args (0) passed to: PersistentVector on loop/recur function
- Fast Prime Number Generation in Clojure
- How Are Lazy Sequences Implemented in Clojure?
- Why does using keywords or symbols as functions to lookup values from maps work?
- Constructing a map on anonymous function in Clojure
- How many primitives does it take to build a LISP machine? Ten, seven or five?
- Clojure multimethods vs. protocols
- How can I display the definition of a function in Clojure at the REPL?
- How many arguments does an anonymous function expect in clojure?
- Function call in -> threading macro
- Why such implementation of partial in clojure.core
- Difference between Symbols and Vars in Clojure
- What are common conventions for using namespaces in Clojure?