Created
April 14, 2011 17:55
-
-
Save robotarmy/920063 to your computer and use it in GitHub Desktop.
splitOn: creates an ordered Collection from a ' ' object (Text? String? SomethingEls?)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Transcript clear. | |
dc := Dictionary new. | |
b := ' t aoeu a aoeu aou aoeu' splitOn: ' '. | |
b do: [:e | | |
dc at:e ifAbsentPut: [ 0 ]. | |
dc at:e put: ((dc at: e) + 1). | |
]. | |
Transcript show: dc. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment