math.bitwise: bitfield should just use map-reduce.
parent
b1ac83c908
commit
0eea157d90
|
@ -72,8 +72,7 @@ PRIVATE>
|
||||||
|
|
||||||
MACRO: bitfield ( bitspec -- )
|
MACRO: bitfield ( bitspec -- )
|
||||||
[ [ 0 ] ] [
|
[ [ 0 ] ] [
|
||||||
[ (bitfield-quot) ] map unclip
|
[ (bitfield-quot) ] [ '[ @ _ dip bitor ] ] map-reduce
|
||||||
[ '[ @ _ dip bitor ] ] reduce
|
|
||||||
] if-empty ;
|
] if-empty ;
|
||||||
|
|
||||||
! bit-count
|
! bit-count
|
||||||
|
|
Loading…
Reference in New Issue