From: Carlos Date: 2002-06-16T03:16:20+09:00 Subject: Re: ruby-dev summary 17252-17356 > let{ 5.times do p p; p=p.next end} > > or > > let{p:=list; 5.times do p p; p=p.next end} But in let{a:=1; b:=2; obj.meth(a).meth(b) do ... end } a and b are locals before I want them to be locals... I want them to be locals in the iteration only. Yes, I don't know if it's useful, I am not an expert programmer and sometimes lack some common sense ;). By the way, it will be let{ ... } and let ... end or how? > Show me. I'm always open, and but still deserve the right to > like/dislike ideas. ;-) Well, like others proposed too, the idea is to have a header for the block that could be used to initialize variables. Like the first part in a for( ; ; ). 5.times let p:=list do p p; p=p.next end or 5.times let do p p; p=p.next end The only benefit is that it avoids excesive nesting... I use tabs for indenting ;).