(node>subalist-right) ( to-key node end-comparator: ( key1 key2 -- ? ) -- )


Vocabulary
trees.private

Inputs
to-keyan object
nodean object
end-comparatora quotation with stack effect ( key1 key2 -- ? )


Outputs
None

Definition


:: (node>subalist-right)
( to-key node end-comparator: ( key1 key2 -- ? ) -- )
node [
node key>> to-key end-comparator call
:> node-left? node left>> node-left?
[ (node>alist) ]
[ [ to-key ] dip end-comparator (node>subalist-right) ]
if node-left? [
node
[ entry, ] [
right>> [ to-key ] dip
end-comparator (node>subalist-right)
] bi
] when
] when ; inline recursive