inject: is actually select: or reject: or...
P | N


| aString |

aString := 'Now is the time for all good men to come to the aid of their blah blah blah'.

"inject: as select:"

aString inject: '' into: [:newString :nextCharacter |

newString , (nextCharacter isVowel ifTrue: [nextCharacter asString] ifFalse: [''])].

"--> 'oieieoaooeooeoeaioeiaaa'"


Previous | Next


Last modified at 7/24/97; 1:43:35 PM
Other Links of Interest
College of Computing | EduTech Institute | GVU Center
Mark Guzdial | Papers | CS 2390 Spring '97 Home Page | STABLE | MMC-CaMILE

Slide Master