Created
January 16, 2016 01:34
-
-
Save Stiivi/1e2078c0054836d2cc00 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Self-organizing trees | |
# | |
CONCEPT node | |
TAG free | |
SLOT left, right | |
CONCEPT head | |
TAG open, node | |
SLOT left, right | |
WHERE node, open AND NOT BOUND left ON free, node DO | |
BIND left TO other | |
IN other UNSET free | |
IN other SET open | |
WHERE node, open AND NOT BOUND right ON free, node DO | |
BIND right TO other | |
IN other UNSET free | |
IN other SET open | |
WHERE node, open AND BOUND left AND BOUND right DO | |
UNSET open | |
WORLD main | |
OBJECT head * 5 | |
OBJECT node * 1000 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment