Find limit of recursion: Difference between revisions

Content added Content deleted
(→‎{{header|AppleScript}}: Added a third test.)
m (→‎{{header|AppleScript}}: →‎Test 3: Changed handler name to avoid confusion of authorship.)
Line 366: Line 366:
<lang applescript>global i
<lang applescript>global i


on |λ|()
on recursion()
set i to i + 1
set i to i + 1
|λ|()
recursion()
end |λ|
end recursion


on run
on run
set i to -1
set i to -1
try
try
|λ|()
recursion()
on error
on error
"Recursion limit encountered at " & i
"Recursion limit encountered at " & i