Facebook Post Permutation Sample
# Snippet Start
set = %w(Logan Paul is an idiot)
permutator = set.permutation 3
3.times {
permutator.next # => ["Logan", "Paul", "is"], ["Logan", "Paul", "an"], ["Logan", "Paul", "idiot"]
}
# Snippet End
# Snippet Start
set = %w(Logan Paul is an idiot)
permutator = set.permutation 3
3.times {
permutator.next # => ["Logan", "Paul", "is"], ["Logan", "Paul", "an"], ["Logan", "Paul", "idiot"]
}
# Snippet End
Comments