sequences: Add examples for member? word.
parent
7799c6f217
commit
7e6311a62a
|
@ -522,6 +522,20 @@ HELP: last-index-from
|
||||||
HELP: member?
|
HELP: member?
|
||||||
{ $values { "elt" object } { "seq" sequence } { "?" boolean } }
|
{ $values { "elt" object } { "seq" sequence } { "?" boolean } }
|
||||||
{ $description "Tests if the sequence contains an element equal to the object." }
|
{ $description "Tests if the sequence contains an element equal to the object." }
|
||||||
|
{ $examples
|
||||||
|
"Is a letter in a string:"
|
||||||
|
{ $example
|
||||||
|
"USING: sequences prettyprint ;"
|
||||||
|
"""CHAR: a "abc" member? ."""
|
||||||
|
"t"
|
||||||
|
} $nl
|
||||||
|
"Is a number in a sequence:"
|
||||||
|
{ $example
|
||||||
|
"USING: sequences prettyprint ;"
|
||||||
|
"1 { 1 2 3 } member? ."
|
||||||
|
"t"
|
||||||
|
}
|
||||||
|
}
|
||||||
{ $notes "This word uses equality comparison (" { $link = } ")." } ;
|
{ $notes "This word uses equality comparison (" { $link = } ")." } ;
|
||||||
|
|
||||||
HELP: member-eq?
|
HELP: member-eq?
|
||||||
|
|
Loading…
Reference in New Issue