master
CrossNox 3 years ago
parent b85a22757f
commit 56d6420dc1
  1. 5
      src/rustint/core.clj

@ -2163,6 +2163,10 @@
; user=> (compatibles? 'char ['a])
; true
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defn usize? [arg]
(and (> arg 0) (integer? arg))
)
(defn compatibles? [rtype arg]
(let [rtypes (
hash-map
@ -2170,6 +2174,7 @@
'f64 float?,
'String string?,
'bool boolean?
'usize usize?
), func (get rtypes rtype)]
(or (vector? arg) (func arg))
)

Loading…
Cancel
Save