【发布时间】:2011-06-16 14:09:37
【问题描述】:
我很好奇如何做一个包含对自身的引用的 Clojure deftype,例如
(deftype BinaryTree [^BinaryTree left ^BinaryTree right])
这不起作用...但是我看不出它不可能的内在原因,因为底层 Java 类完全能够引用自身。
我在这里做错了什么?
迈克。
【问题讨论】:
标签: data-structures clojure type-hinting deftype