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

7 lines
125 B
Text

s: [1, 2, 2, 3, 4, 4, 5]$
for i from 1 thru 7 do(
curr: s[i],
if i>1 and curr=prev then print(i),
prev: curr
);