#( 11 7 4 21 ) detectIndex: #even
#( 11 7 4 21 ) detectIndex: [:el | el < 5]
#( 1 3 5 7 ) detectIndex: #even ifNone: [ self error: 'no even number found' ]
Post a Comment
No comments:
Post a Comment