Ok so I'm trying to learn Ruby. My plan was to get a feel for the syntax by trying to work through
Ninety-Nine Lisp Problems in Ruby. However I got stuck on Problem 7.
My
test code looks like:
And my "my_flatten" method looks like:
But my code fails at my first assertion (Expected [] but was [[]]),
and if I comment that out it fails on my third assertion too:
Expected [1, 2, 3, 4, 5] but was [1, [2, 3], 4, 5].
Can any of you guys give me a nudge int the right direction?
[ February 18, 2008: Message edited by: Garrett Rowe ]