sequences: surround a $example with a $examples to the if-empty word's help
parent
629ea1163b
commit
334d0de92a
core/sequences
|
@ -83,10 +83,12 @@ HELP: empty?
|
||||||
HELP: if-empty
|
HELP: if-empty
|
||||||
{ $values { "seq" sequence } { "quot1" quotation } { "quot2" quotation } }
|
{ $values { "seq" sequence } { "quot1" quotation } { "quot2" quotation } }
|
||||||
{ $description "Makes an implicit check if the sequence is empty. An empty sequence is dropped and " { $snippet "quot1" } " is called. Otherwise, if the sequence has any elements, " { $snippet "quot2" } " is called on it." }
|
{ $description "Makes an implicit check if the sequence is empty. An empty sequence is dropped and " { $snippet "quot1" } " is called. Otherwise, if the sequence has any elements, " { $snippet "quot2" } " is called on it." }
|
||||||
{ $example
|
{ $examples
|
||||||
"USING: kernel prettyprint sequences ;"
|
{ $example
|
||||||
"{ 1 2 3 } [ \"empty sequence\" ] [ sum ] if-empty ."
|
"USING: kernel prettyprint sequences ;"
|
||||||
"6"
|
"{ 1 2 3 } [ \"empty sequence\" ] [ sum ] if-empty ."
|
||||||
|
"6"
|
||||||
|
}
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
HELP: when-empty
|
HELP: when-empty
|
||||||
|
|
Loading…
Reference in New Issue