News for hackers. Stuff that matters.
Re:Destructuring with Ruby by SpikeGronim on Wednesday August 10, 2011 @03:19PM (#2869761)
What really hooked me on destructuring and argument pattern matching was a sophomore year lecture on red black trees in ML. The rotation function was implemented multiple times with different patterns matching the different local tree structures that needed rotating. Much much more elegant than any other implementation of that they I've ever seen.
Re:Destructuring with Ruby by eru on Wednesday August 10, 2011 @04:30PM (#2870045)
Get a copy of Okasaki's "Purely Functional Data Structure".

Alas, as far as I remember, deleting an element out of a purely functional red-black tree is more messy.