]> gitweb.factorcode.org Git - factor.git/commitdiff
math.bitwise: bitfield should just use map-reduce.
authorJohn Benediktsson <mrjbq7@gmail.com>
Sun, 31 May 2015 15:04:34 +0000 (08:04 -0700)
committerJohn Benediktsson <mrjbq7@gmail.com>
Sun, 31 May 2015 15:04:34 +0000 (08:04 -0700)
basis/math/bitwise/bitwise.factor

index 5ad335e7f99586861f467595f381fc0f17c8d586..3658fa5d593bcce7d0d5a0a388a88812e8257169 100644 (file)
@@ -72,8 +72,7 @@ PRIVATE>
 
 MACRO: bitfield ( bitspec -- )
     [ [ 0 ] ] [
-        [ (bitfield-quot) ] map unclip
-        [ '[ @ _ dip bitor ] ] reduce
+        [ (bitfield-quot) ] [ '[ @ _ dip bitor ] ] map-reduce
     ] if-empty ;
 
 ! bit-count