Use `left` and `right` constants from trees vocabulary
parent
e5384bc1b0
commit
e3f4600c85
|
@ -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.
|
||||
|
|
Loading…
Reference in New Issue