Fixing fallout from sequences.generalizations change

db4
Slava Pestov 2010-05-18 22:59:07 -04:00
parent cf7451131e
commit e30a429985
3 changed files with 25 additions and 7 deletions

View File

@ -14,7 +14,13 @@ HELP: npick
"placed on the top of the stack."
}
{ $examples
{ $example "USING: kernel prettyprint generalizations ;" "1 2 3 4 4 npick 5 narray ." "{ 1 2 3 4 1 }" }
{ $example
"USING: kernel generalizations prettyprint"
"sequences.generalizations ;"
""
"1 2 3 4 4 npick 5 narray ."
"{ 1 2 3 4 1 }"
}
"Some core words expressed in terms of " { $link npick } ":"
{ $table
{ { $link dup } { $snippet "1 npick" } }
@ -31,7 +37,13 @@ HELP: ndup
"placed on the top of the stack."
}
{ $examples
{ $example "USING: prettyprint generalizations kernel ;" "1 2 3 4 4 ndup 8 narray ." "{ 1 2 3 4 1 2 3 4 }" }
{ $example
"USING: prettyprint generalizations kernel"
"sequences.generalizations ;"
""
"1 2 3 4 4 ndup 8 narray ."
"{ 1 2 3 4 1 2 3 4 }"
}
"Some core words expressed in terms of " { $link ndup } ":"
{ $table
{ { $link dup } { $snippet "1 ndup" } }
@ -129,7 +141,13 @@ HELP: nkeep
"saved, the quotation called, and the items restored."
}
{ $examples
{ $example "USING: generalizations kernel prettyprint ;" "1 2 3 4 5 [ drop drop drop drop drop 99 ] 5 nkeep 6 narray ." "{ 99 1 2 3 4 5 }" }
{ $example
"USING: generalizations kernel prettyprint"
"sequences.generalizations ;"
""
"1 2 3 4 5 [ drop drop drop drop drop 99 ] 5 nkeep 6 narray ."
"{ 99 1 2 3 4 5 }"
}
"Some core words expressed in terms of " { $link nkeep } ":"
{ $table
{ { $link keep } { $snippet "1 nkeep" } }

View File

@ -1,7 +1,7 @@
! (c)Joe Groff bsd license
USING: accessors arrays compiler.test continuations generalizations
kernel kernel.private locals math.vectors.conversion math.vectors.simd
sequences stack-checker tools.test ;
sequences stack-checker tools.test sequences.generalizations ;
FROM: alien.c-types => char uchar short ushort int uint longlong ulonglong float double ;
IN: math.vectors.conversion.tests

View File

@ -10,7 +10,7 @@ HELP: nsequence
"that constructs a sequence from the top " { $snippet "n" } " elements of the stack."
}
{ $examples
{ $example "USING: generalizations prettyprint ;" "CHAR: f CHAR: i CHAR: s CHAR: h 4 \"\" nsequence ." "\"fish\"" }
{ $example "USING: prettyprint sequences.generalizations ;" "CHAR: f CHAR: i CHAR: s CHAR: h 4 \"\" nsequence ." "\"fish\"" }
} ;
HELP: narray
@ -60,7 +60,7 @@ HELP: nappend
{ $description "Outputs a new sequence consisting of the elements of the top " { $snippet "n" } " sequences from the datastack in turn." }
{ $errors "Throws an error if any of the sequences contain elements that are not permitted in the sequence type of the first sequence." }
{ $examples
{ $example "USING: generalizations prettyprint math ;"
{ $example "USING: math prettyprint sequences.generalizations ;"
"{ 1 2 } { 3 4 } { 5 6 } { 7 8 } 4 nappend ."
"{ 1 2 3 4 5 6 7 8 }"
}
@ -74,7 +74,7 @@ HELP: nappend-as
{ $description "Outputs a new sequence of type " { $snippet "exemplar" } " consisting of the elements of the top " { $snippet "n" } " sequences from the datastack in turn." }
{ $errors "Throws an error if any of the sequences contain elements that are not permitted in the sequence type of the first sequence." }
{ $examples
{ $example "USING: generalizations prettyprint math ;"
{ $example "USING: math prettyprint sequences.generalizations ;"
"{ 1 2 } { 3 4 } { 5 6 } { 7 8 } 4 V{ } nappend-as ."
"V{ 1 2 3 4 5 6 7 8 }"
}