module Enumerable

Public Instance Methods

map_with_index() { |ary, i| ... } click to toggle source
# File lib/musicality/composition/util/biinfinite_sequence.rb, line 2
def map_with_index
  return enum_for(:map_with_index) unless block_given?
  ary = entries
  Array.new(ary.size) do |i|
    yield ary[i], i
  end
end
to_pcs() click to toggle source
# File lib/musicality/pitch_class.rb, line 30
def to_pcs
  map {|value| value.to_pc }
end