Jump to content

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

Cookies help us deliver our services. By using our services, you agree to our use of cookies.