RosettaCodeData/Task/Variable-declaration-reset/AppleScript/variable-declaration-reset.applescript
2026-04-30 12:34:36 -04:00

7 lines
149 B
AppleScript

set s to {1, 2, 2, 3, 4, 4, 5}
repeat with i from 1 to 7
set curr to item i of s
if i > 1 and curr = prev then log i
set prev to curr
end repeat