You're viewing version 1.2.0 of unquote-splicing. The latest stable version of Clojure Core is 1.3.0.
1.2.0 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.

Comments top

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