Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

14 lines (13 sloc) 0.365 kb
class InfiniteBeats < InfiniteStream
attr_accessor :start, :interval
def generating_loop
@start ||= 8 # magic numbers could obviously be args
@interval ||= 8 # magic numbers could obviously be args
generate(@start)
car, cdr = @start, (@start + @interval)
loop do
generate(cdr)
car, cdr = cdr, cdr + @interval
end
end
end
Jump to Line
Something went wrong with that request. Please try again.