RosettaCodeData/Task/Look-and-say-sequence/Logo/look-and-say-sequence.logo
Ingy döt Net db842d013d A-M baby
2013-04-10 21:29:02 -07:00

11 lines
374 B
Text

to look.and.say.loop :in :run :c :out
if empty? :in [output (word :out :run :c)]
if equal? first :in :c [output look.and.say.loop bf :in :run+1 :c :out]
output look.and.say.loop bf :in 1 first :in (word :out :run :c)
end
to look.and.say :in
if empty? :in [output :in]
output look.and.say.loop bf :in 1 first :in "||
end
show cascade 10 [print ? look.and.say ?] 1