From: 7stud -- Date: 2011-03-22T08:36:05+09:00 Subject: Re: scope of assignments with lambda Fearless Fool wrote in post #988575: > This isn't a question -- it's just a comment that I find it awesome and > only slightly mysterious that a lambda can reference the variable it is > assigned to in its body, How does recursion grab you? def factorial(n) if n == 1 1 else n * factorial(n-1) end end puts factorial(3) --output:-- 6 You might want to ponder the difference between your example and a recursive method. -- Posted via http://www.ruby-forum.com/.