Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Solemnisation
funcs = %w(do re mi fa so la si 𝕕o)
# funcs = %w(Do Re Mi Fa So La Si do re mi fa so la si 𝕕o)
intervals = funcs.permutation(2)
puts "Functions count: #{funcs.length}"
puts "Permutation count: #{intervals.to_a.length}"
last = nil
intervals.each do |a, b|
if last != a then
last = a
puts
end
puts "#{a}#{b}"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment