Skip to content

Instantly share code, notes, and snippets.

@wieczorek1990
Last active March 27, 2017 20:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wieczorek1990/360a250641aed594782abc65e23d674d to your computer and use it in GitHub Desktop.
Save wieczorek1990/360a250641aed594782abc65e23d674d to your computer and use it in GitHub Desktop.
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