 
 (defn- $lift [& fs] (partial map #(%1 %2) fs))
 
-(defmacro impl-invoke [record]
-	(let [parted-record (partition-by #(= % 'clojure.lang.IFn) record)
+(defmacro defrecord-ifn [& record-parts]
+	(let [parted-record (partition-by #(= % 'clojure.lang.IFn) record-parts)
 	      paramses (map (fn [n] (map #(symbol (str "_" %)) (range 0 n))) (range 0 21))]
 		(concat
+			(list 'defrecord)
 			(apply concat (take 2 parted-record))
 			(map (fn [params] `(~'invoke [~'this ~@params] (.applyTo ~'this (list ~@params)))) paramses)
 			(list `(~'invoke [~'this ~@(last paramses) ~'more] (.applyTo ~'this (concat (list ~@(last paramses)) ~'more))))

;; Character Entities

(defmacro defentity
	([id] `(def ~id (literal ~(str "&" (name id) ";"))))
	([id value] `(def ~id (literal ~(str "&" (name value) ";")))))

(defentity nbsp)

					" />"
					[">" (map html-escape items) "</" tag-name ">"]))))
	clojure.lang.IFn
	(applyTo [this args] (apply extend-tag this args)))

(defrecord Literal [s] java.lang.Object (toString [_] s))

