diff --git a/library/bootstrap/boot-stage1.factor b/library/bootstrap/boot-stage1.factor index f37138687b..ff22c84343 100644 --- a/library/bootstrap/boot-stage1.factor +++ b/library/bootstrap/boot-stage1.factor @@ -215,7 +215,7 @@ vectors words ; "/library/collections/strings.facts" "/library/collections/tree-each.facts" "/library/collections/vectors.facts" - "/library/collections/virtual-sequence.facts" + "/library/collections/virtual-sequences.facts" "/library/syntax/parse-syntax.factor" diff --git a/library/help/markup.factor b/library/help/markup.factor index b94d53e6e8..c98d16911b 100644 --- a/library/help/markup.factor +++ b/library/help/markup.factor @@ -95,9 +95,6 @@ M: simple-element print-element [ print-element ] each ; : textual-list ( seq quot -- ) [ "," format* bl ] interleave ; inline -: $see-also ( content -- ) - "See also" $subheading [ 1array $link ] textual-list ; - : $see ( content -- ) terpri* code-style [ [ first see ] with-nesting* ] with-style @@ -142,6 +139,9 @@ DEFER: help : $definition ( content -- ) "Definition" $subheading $see ; +: $see-also ( content -- ) + "See also" $subheading [ 1array $link ] textual-list ; + : $predicate ( content -- ) { { "object" "an object" } } $values "Tests if the top of the stack is " $description diff --git a/library/math/pow.factor b/library/math/pow.factor index b7140304ff..0018ca805f 100644 --- a/library/math/pow.factor +++ b/library/math/pow.factor @@ -29,7 +29,7 @@ M: number ^ ( z w -- z^w ) : each-bit ( n quot -- | quot: 0/1 -- ) #! Apply the quotation to each bit of the number. The number #! must be positive. - over 0 number= [ + over 0 number= pick -1 number= or [ 2drop ] [ 2dup >r >r >r 1 bitand r> call r> -1 shift r> each-bit diff --git a/library/test/math/integer.factor b/library/test/math/integer.factor index 11dfb9a329..ee3b85e3c9 100644 --- a/library/test/math/integer.factor +++ b/library/test/math/integer.factor @@ -1,5 +1,5 @@ IN: temporary -USING: kernel math prettyprint test ; +USING: kernel math namespaces prettyprint test ; [ "-8" ] [ -8 unparse ] unit-test @@ -97,3 +97,5 @@ unit-test [ 0 ] [ -1 -268435456 >fixnum /i ] unit-test [ 0 -1 ] [ -1 -268435456 >fixnum /mod ] unit-test [ 14355 ] [ 1591517158873146351817850880000000 32769 mod ] unit-test + +[ { 0 1 1 0 } ] [ [ -10 [ , ] each-bit ] { } make ] unit-test