This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defn array-type | |
"Return a string representing the type of an array with dims | |
dimentions and an element of type klass. | |
For primitives, use a klass like Integer/TYPE | |
Useful for type hints of the form: ^#=(array-type String) my-str-array" | |
([klass] (array-type klass 1)) | |
([klass dims] | |
(.getName (class | |
(apply make-array | |
(if (symbol? klass) (eval klass) klass) |