Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
1
Task/Permutations/Groovy/permutations-1.groovy
Normal file
1
Task/Permutations/Groovy/permutations-1.groovy
Normal file
|
|
@ -0,0 +1 @@
|
|||
def makePermutations = { l -> l.permutations() }
|
||||
4
Task/Permutations/Groovy/permutations-2.groovy
Normal file
4
Task/Permutations/Groovy/permutations-2.groovy
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
def list = ['Crosby', 'Stills', 'Nash', 'Young']
|
||||
def permutations = makePermutations(list)
|
||||
assert permutations.size() == (1..<(list.size()+1)).inject(1) { prod, i -> prod*i }
|
||||
permutations.each { println it }
|
||||
Loading…
Add table
Add a link
Reference in a new issue