(type egg)
(signature "llrb-syntax egg")
(timestamp 1612269487)
(sxml ((section 2 "Outdated egg!" (p "This is an egg for CHICKEN 4, the unsupported old release.  You're almost certainly looking for " (int-link "/eggref/5/llrb-syntax" "the CHICKEN 5 version of this egg") ", if it exists.") (p "If it does not exist, there may be equivalent functionality provided by another egg; have a look at the " (link "https://wiki.call-cc.org/chicken-projects/egg-index-5.html" "egg index") ". Otherwise, please consider porting this egg to the current version of CHICKEN.") (tags "egg")) (section 2 "llrb-syntax" (p "A syntax-rules macro expanding into left-leaning red-black tree code. Pure and mutating versions.")) (section 2 "Overview" (p "A left-leaning red–black (LLRB) tree is a type of self-balancing binary search tree. It is a variant of the red–black tree and guarantees the same asymptotic complexity for operations. [wikipedia].") (p "The macro is independent of data structures used to implement nodes of the trees.  Users must pass accessors and a syntax or procedure to update an existing node (for the mutating version) respectively create a fresh node as well as names for the procedures to be defined.")) (section 2 "Examples" (p "See the llrb-tree egg.")) (section 2 "API" (p "<syntax>") (pre "   define-llrbtree/positional\n   (FEATURES)\n   UPDATE\n   init-root-node!\t\t;; defined\n   t-lookup\t\t;; defined\n   t-min\t\t\t;; defined\n   t-fold\t\t\t;; defined\n   t-for-each\t\t;; defined\n   t-insert\t\t;; defined\n   t-delete\t\t;; defined\n   t-delete-min\t\t;; defined\n   t-empty?\t\t;; defined") (pre "   ;; These syntax is used expand to code for comparision\n   ;; expressions.\n   t-k-eq?\t\t\t;; key<>node-key \"equal\"\n   t-eq?\t\t\t;; node-key<>node-key \"equal\"\n   t-k-<?\t\t\t;; key<>node-key \"less then\"\n   t-<?\t\t\t;; node<>node \"less then\"\n   ;; Accessors to the elements of the tree.\n   left\n   right\n   color") (p "</syntax>") (p "FEATURES: {ordered, pure, leftmost} – configures the generated code.") (p "UPDATE") (p "The \"update*\" syntax must accept a node structure and key-value pairs.  Keys are color:, left: and right:") (p "\"update\" : If feature \"pure\" is set, \"update\" must expand to a newly allocated node, otherwise is MUST expand to a side effect full update of the original node."))))
