A type hint makes no difference because the param "state" is treated
as an Object instance.
user=> (:x @*aa*)
3
user=> (.invoke :x @*aa*) ; [16] invoke : Object (Object)
3
Besides, I don't think it's a good idea trying to setup some sort of
static type-checker and strongly-typed functions. You're
2011/4/21 Tzach :
> I made a stupid mistake, and I want to share. This is not the actual code, I
> simplify it to demonstrate the point.
>
> I use a atom to a global hash as follow:
>
> (def *aa* (atom {:x 3 :y 4 :z 17}))
>
> Somewhere on the code, I have a function which look at the state and do
I made a stupid mistake, and I want to share. This is not the actual code, I
simplify it to demonstrate the point.
I use a atom to a global hash as follow:
(def *aa* (atom {:x 3 :y 4 :z 17}))
Somewhere on the code, I have a function which look at the state and do
something:
(defn foo [stat