File tree 2 files changed +7
-3
lines changed
2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change 342
342
343
343
; ; Predicate
344
344
(def ~(add-meta (add-predicate-doc type predicate ?docref) meta-data)
345
- (fn [x#] ( rrun/record-of- type? x# ~rtd-symbol) ))
345
+ (rrun/record-type-predicate ~rtd-symbol))
346
346
347
347
; ; Constructor
348
348
; ; We are defining a anonymous function for the define constructor function.
Original file line number Diff line number Diff line change 160
160
(.-rtd r))
161
161
162
162
(defn record-of-type?
163
- [^Record r ^RecordTypeDescriptor rtd]
163
+ [r ^RecordTypeDescriptor rtd]
164
164
(and (record? r)
165
- (rtd= rtd (.-rtd r))))
165
+ (rtd= rtd (.-rtd ^Record r))))
166
+
167
+ (defn record-type-predicate [^RecordTypeDescriptor rtd]
168
+ (fn [x]
169
+ (record-of-type? x rtd)))
166
170
167
171
; assumes that ?r, ?rtd are identifiers alerady
168
172
(defmacro record-check-rtd!
You can’t perform that action at this time.
0 commit comments