Permalink
Browse files

Add records w/ and w/o fields

  • Loading branch information...
1 parent bc93fcb commit d8ac662c753f2e7714ecdb2a84420bc81fbd5482 @michalmarczyk committed Apr 19, 2012
Showing with 16 additions and 1 deletion.
  1. +11 −1 src/cljs/phm.cljs
  2. +5 −0 src/cljs/phm/records.cljs
View
@@ -1,4 +1,5 @@
-(ns phm)
+(ns phm
+ (:use [phm.records :only [->RFoo ->RBar]]))
(defn ^:export empty-obj-map []
cljs.core.ObjMap/EMPTY)
@@ -35,3 +36,12 @@
(defn ^:export assocbangwrapper [tm k v]
(assoc! tm k v))
+
+(defn ^:export make-keyword [n]
+ (keyword n))
+
+(defn ^:export fresh-record-four-fields []
+ (->RFoo nil nil nil nil))
+
+(defn ^:export fresh-record-no-fields []
+ (->RBar))
@@ -0,0 +1,5 @@
+(ns phm.records)
+
+(defrecord RFoo [a s d f])
+
+(defrecord RBar [])

0 comments on commit d8ac662

Please sign in to comment.