Next: , Previous: Iterable class-multibyte encodings, Up: Iterable


1.91.2 Iterable: enumeration

allSatisfy: aBlock
Search the receiver for an element for which aBlock returns false. Answer true if none does, false otherwise.


anySatisfy: aBlock
Search the receiver for an element for which aBlock returns true. Answer true if some does, false otherwise.


collect: aBlock
Answer a new instance of a Collection containing all the results of evaluating aBlock passing each of the receiver's elements


conform: aBlock
Search the receiver for an element for which aBlock returns false. Answer true if none does, false otherwise.


contains: aBlock
Search the receiver for an element for which aBlock returns true. Answer true if some does, false otherwise.


count: aBlock
Count the elements of the receiver for which aBlock returns true, and return their number.


detect: aBlock
Search the receiver for an element for which aBlock returns true. If some does, answer it. If none does, fail


detect: aBlock ifNone: exceptionBlock
Search the receiver for an element for which aBlock returns true. If some does, answer it. If none does, answer the result of evaluating aBlock


do: aBlock
Enumerate each object of the receiver, passing them to aBlock


do: aBlock separatedBy: separatorBlock
Enumerate each object of the receiver, passing them to aBlock. Between every two invocations of aBlock, invoke separatorBlock


fold: binaryBlock
First, pass to binaryBlock the first and second elements of the receiver; for each subsequent element, pass the result of the previous evaluation and an element. Answer the result of the last invocation, or the first element if the collection has size 1. Fail if the collection is empty.


inject: thisValue into: binaryBlock
First, pass to binaryBlock thisValue and the first element of the receiver; for each subsequent element, pass the result of the previous evaluation and an element. Answer the result of the last invocation.


noneSatisfy: aBlock
Search the receiver for an element for which aBlock returns true. Answer true if none does, false otherwise.


reject: aBlock
Answer a new instance of a Collection containing all the elements in the receiver which, when passed to aBlock, don't answer true


select: aBlock
Answer a new instance of a Collection containing all the elements in the receiver which, when passed to aBlock, answer true