Skip to content

Instantly share code, notes, and snippets.

@rchaser53
Created September 8, 2017 08:10
Show Gist options
  • Save rchaser53/7fdf020412b08266a5735393dd666541 to your computer and use it in GitHub Desktop.
Save rchaser53/7fdf020412b08266a5735393dd666541 to your computer and use it in GitHub Desktop.
|hoge|
hoge := array collect: [ :elem |
| dict |
dict := Dictionary new.
dict at: #base put: elem.
dict at: #translated put: (self trans: elem).
dict
].
hoge := hoge asOrderedCollection
sorted: [:a :b |
self halt.
(a at: #translated) < (b at: #translated)
].
hoge := hoge collect: [ :elem |
elem at: #base.
].
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment