deflog(descriptionOfProc,proc)
puts "I have started proc #{descriptionOfProc}"
puts "#{descriptionOfProc} is finished, returning #{proc.call}"end
inner=Proc.new do |x,y|
x+y
end
middle=Proc.new do |x|
log("inner", inner[1, 2])
"check2"end
outer=Proc.new do |x|
log("middle", middle)
"check3"end
puts log("outer", outer)