closure_of_applescript.scpt
(* closure of applescript *)
on theClosure()
script outer
property x : 0
script inner
set x to x + 1
end script
end script
return inner of outer
end theClosure
set s to theClosure()
run s
run s
run s
run s
run s
-- result : 5
~~~~