Closed amiika closed 2 years ago
Need for recursive cycles?
z1 "<1 <3 4> 3>" # Useful ... or not?
For testing:
cycle = resolve_cycle(Thread.current[:tshared][:loop_i],v[:cycle]).to_z
def resolve_cycle(loop_i, item)
if item.is_a?(Hash) && item[:cycle]
resolve_cycle loop_i, item[:cycle][loop_i%item[:cycle].length]
else
ZiffArray.new(item.compact)
end
end
Refactoring repeat alternate endings to more generic cycles syntax, kind of like in tidalcycles:
This refactoring breaks the old syntax, but some support both could be also added for the old one ... not like anyone is actually using these and would mind ... right?