From: 7stud -- Date: 2011-04-20T11:28:26+09:00 Subject: Re: anonymous closures with Proc,new, lambda and -> Stu wrote in post #993854: > how would i break it down to two functions? Is this what you are looking for: inc = lambda do n = 1 lambda{n += 1} end.call counter = lambda{inc.call} puts counter[] puts counter[] --output:-- 2 3 -- Posted via http://www.ruby-forum.com/.