[Pharo-users] index of element matching block

Sven Van Caekenberghe sven at stfx.eu
Wed Feb 12 06:44:11 EST 2014


#( 11 7 4 21 ) detectIndex: #even

;-)

On 12 Feb 2014, at 12:37, Norbert Hartl <norbert at hartl.name> wrote:

> I just discovered that there is no method like
> 
> indexOf: aBlock
> 
> where the index of the element matching the block is returned. What would be the usual way to achieve this functionality?
> 
> Norbert
> 
> 





More information about the Pharo-users mailing list