Permalink
Browse files

Add prepend-attr transformation.

  • Loading branch information...
1 parent 3b7cfb8 commit 598d1e88853e5e0b55375d22f385e72301a31b88 @seancorfield committed Nov 24, 2011
Showing with 3 additions and 0 deletions.
  1. +3 −0 src/framework/one.clj
@@ -23,6 +23,9 @@
(defn append-attr [attr v]
#((set-attr attr (str (get-in % [:attrs attr] "") v)) %))
+(defn prepend-attr [attr v]
+ #((set-attr attr (str v (get-in % [:attrs attr] ""))) %))
+
;; scope access utility
(defn- scope-access [scope]
(fn

0 comments on commit 598d1e8

Please sign in to comment.