1
0
Fork 0

Use `left` and `right` constants from trees vocabulary

master
Michael Raitza 2020-02-24 15:44:26 +01:00
parent e5384bc1b0
commit e3f4600c85
1 changed files with 1 additions and 3 deletions

View File

@ -35,10 +35,8 @@ TUPLE: cb-node { byte# integer } { bits integer } left right ;
: <cb-node> ( byte# bits -- node )
cb-node new-node ;
! -1 = left
! 1 = right
: key-side ( bits byte -- side )
bitor 1 + -8 shift 0 = -1 1 ? ;
bitor 1 + -8 shift 0 = left right ? ;
! Produce a byte with all bits set except the msb from bits*.
! See MAGIC Algorithms for rationale.