lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


It was thus said that the Great Sean Conner once stated:
> 
>   If I'm doing this, then I would restructure the code to be:
> 
> 	-- existing code
> 
> 	local function foo()
> 	  for ...
> 	    for ...
> 	      for ...
> 	        if somecondition then
>                   return
> 		end
> 	      end
>             end
> 	  end
> 	end
> 	
> 	foo()

  And for those that know that naming things is one of the harder problems
in Computer Science:

	(function()
	  for ...
	    for ...
	      for ...
	        if somecondition then
	          return
	        end
	      end
	    end
	  end
	end)()

  -spc