Kolakoski sequence: Difference between revisions

→‎{{header|Ruby}}: Get rid of index.
(→‎{{header|Ruby}}: Get rid of index.)
Line 1,155:
cycle = ar.cycle
s = []
(0..).eachloop do |k|
ts.push (t= cycle.next)
sy << t(v=s.shift)
y(v-1).times{s << t}
(s[k]-1).times do
s << t
y << t
end
end
end
1,149

edits