Status: Accepted
Owner:
[hidden email]
Labels: Type-Cleanup
New issue 7434 by
[hidden email]: collect:thenSelect: is badly
implemented
http://code.google.com/p/pharo/issues/detail?id=7434collect: collectBlock thenSelect: selectBlock
"Utility method to improve readability."
^ (self collect: collectBlock) select: selectBlock
where it should iterate only once over the collection
sth like
| result |
result := self class new.
self do: [:e || value |
value := collectBlock value: e.
(selectBlock value: value) ifTrue: [ result add: value ]]
no ?
_______________________________________________
Pharo-bugtracker mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-bugtracker