]> gitweb.factorcode.org Git - factor.git/commitdiff
math.bitwise: Add an in-order bitfield word called bitfield*.
authorDoug Coleman <doug.coleman@gmail.com>
Sat, 2 May 2020 03:48:48 +0000 (22:48 -0500)
committerDoug Coleman <doug.coleman@gmail.com>
Sat, 2 May 2020 03:48:48 +0000 (22:48 -0500)
basis/math/bitwise/bitwise.factor

index b5e3f3816c96b135b00ae8e86cafc16291eb9951..be447397e6c9314dd972182a9f2336498abbb4ae 100644 (file)
@@ -75,6 +75,9 @@ MACRO: bitfield ( bitspec -- quot )
         [ (bitfield-quot) ] [ '[ @ _ dip bitor ] ] map-reduce
     ] if-empty ;
 
+MACRO: bitfield* ( bitspec -- quot )
+    reverse bitfield ;
+
 ! bit-count
 <PRIVATE