Are you sure?
user=> (defprotocol A (foo [a b]))
A
user=> (extend-protocol A (Class/forName "[D") (foo [a b] [a b]))
nil
user=> (pprint (foo (double-array [1 2 3]) 1))
[[1.0, 2.0, 3.0] 1]
user=> (pprint (amap (float-array [1 2 3]) i ret (float (* 2 (aget ret
i)
[2.0, 4.0, 6.0]
My guess is you
more weirdness!
try this at your REPL:
-extend any protocol to some primitive array type - let's say 'doubles'
-while in the same namespace, try to use amap passing it an array of
floats and also type-hint it with ^floats
*
**IllegalArgumentException No matching method found: aset
clojure.la