| February 2, 2004 | Intro to Ruby | Slide #11 |
| Prev | Next |
Sort list by some property of each item in the list
|
But that's inefficient, since it calls length twice for each comparison
|
Do it all in one step
|
Or more simply
|
It's even uglier in Perl!
|
Ruby 1.8 added Schwartzian transform method!
|
| Prev | Copyright © 2004 Walter C. Mankowski | Next |