Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
PG's Binary Search Trees in Clojure
(
lisp.org
)
38 points
by
nkh
on May 2, 2010
|
hide
|
past
|
favorite
|
5 comments
j_baker
on May 2, 2010
|
next
[–]
Dumb question time: what's the difference between PG's BST and any other BST?
zachbeane
on May 2, 2010
|
parent
|
next
[–]
Paul Graham's was wrong in his book (see
http://www.paulgraham.com/howbroken.html
) but fixed in his later code listing (see
http://lib.store.yahoo.net/lib/paulgraham/acl2.lisp
). The Clojure code looks like the broken version to me.
pg
on May 3, 2010
|
root
|
parent
|
next
[–]
I think you're mistaken. The Clojure version seems to be derived from the Arc version at
http://ycombinator.com/arc/bst.arc
, which is turn derived from the corrected Common Lisp version.
fogus
on May 2, 2010
|
parent
|
prev
|
next
[–]
Up-votes?
Kototama
on May 3, 2010
|
prev
[–]
You may also be interested by my implementation with / without various form of tail-recursion using recur or without:
http://github.com/kototama/ansicommonlisp-book-clojure/blob/...
Consider applying for YC's Spring batch! Applications are open till Feb 11.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: