Handbook
Glossary
bit-manipulator ( offset bits step-quot: ( i mask start-bit -- quot ) combine-quot: ( prev-quot shift-amount next-quot -- quot ) -- quot )
Vocabulary
classes
.
struct
.
bit-accessors
Inputs
offset
an
object
bits
an
object
step-quot
a
quotation
with stack effect
( i mask start-bit -- quot )
combine-quot
a
quotation
with stack effect
( prev-quot shift-amount next-quot -- quot )
Outputs
quot
an
object
Definition
USING:
combinators
kernel
math
;
IN:
classes.struct.bit-accessors
::
bit-manipulator
( offset bits step-quot: ( i mask start-bit -- quot ) combine-quot: ( prev-quot shift-amount next-quot -- quot ) -- quot )
offset bits step-quot
manipulate-bits
[
2drop
]
[
step-quot combine-quot
bit-manipulator
combine-quot ( prev shift next -- quot )
call-effect
]
if-zero
;
inline
recursive