Skip to content

Instantly share code, notes, and snippets.

@robotarmy
Created April 14, 2011 17:55
Show Gist options
  • Save robotarmy/920063 to your computer and use it in GitHub Desktop.
Save robotarmy/920063 to your computer and use it in GitHub Desktop.
splitOn: creates an ordered Collection from a ' ' object (Text? String? SomethingEls?)
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