1.3.0 permalink Arrow_down_16x16

unquote-splicing

clojure.core

2 Examples top

  • user=> (let [x `(2 3)] 
             `(1 ~x))
    (1 (2 3))
    
    user=> (let [x `(2 3)] 
             `(1 ~@x)) 
    (1 2 3)
    
  • user=> `(1 2 ~(list 3 4))
    
    (1 2 (3 4))
    
    user=> `(1 2 ~@(list 3 4))
    
    (1 2 3 4)
    
    ; borrowed from StackOverflow: 
    ; http://stackoverflow.com/questions/4571042/can-someone-explain-clojures-unquote-splice-in-simple-terms
Log in to add / edit an example.

See Also top

Log in to add a see also.

Plus_12x12 Minus_12x12 Source clojure/core.clj:14 top

(def unquote-splicing)
Vars in clojure.core/unquote-splicing:
Used in 0 other vars

Comments top

No comments for unquote-splicing. Log in to add a comment.