nanenj icon

Facebook Post Permutation Sample

nanenj | PRO | 01/23/18 12:07:51 AM UTC | 0 ⭐ | 269 👁️ | Never ⏰ | []
Ruby |

210 B

|

None

|

0 👍

/

0 👎

# 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