Data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 7387c8f97b
commit cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions

View file

@ -0,0 +1,21 @@
function lookAndSay S
put 0 into C
put char 1 of S into lastChar
repeat with i = 2 to length(S)
add 1 to C
if char i of S is lastChar then next repeat
put C & lastChar after R
put 0 into C
put char i of S into lastChar
end repeat
return R & C + 1 & lastChar
end lookAndSay
on demoLookAndSay
put 1 into x
repeat 10
put x & cr after message
put lookAndSay(x) into x
end repeat
put x after message
end demoLookAndSay