2013-11-28 39 views

回答

4

試試這個: 「你好!」

(def a 
    (reify IDeref 
    (-deref [_] "Hello!"))) 

(.log js/console @a) 

輸出。您可能想要使用deftype:

(deftype LikeAtom [] 
    IDeref 
    (-deref [_] "Hello!")) 

(.log js/console @(LikeAtom.)) 
+0

謝謝,作品! – Frawr