Namespaces

 
1.0.0-SNAPSHOT permalink Arrow_down_16x16
  • (clone-for comprehension & forms)

1 Example top

  • ;clones the element for each item in a given collection
    
    ;<ul>
    ; <li> list item </li>
    ;</ul>
    
    [:ul :li](clone-for [item ["item 1" "item 2"]]
                 [:li] (content item)
    
    ;<ul>
    ; <li> item 1 </li>
    ; <li> item 2 </li>
    ;</ul>
    
    
    
    
Log in to add / edit an example.

See Also top

Log in to add a see also.

Plus_12x12 Minus_12x12 Source net/cgrand/enlive_html.clj:657 top

(defmacro clone-for
 [comprehension & forms]
  `(fn [node#]
     (flatten-nodes-coll (for ~comprehension ((transformation ~@forms) node#)))))
Vars in net.cgrand.enlive-html/clone-for: defmacro apply concat fn for list seq vector
Used in 0 other vars

Comments top

No comments for clone-for. Log in to add a comment.