September 2017 Update
This commit is contained in:
parent
bba7bfd280
commit
ba8067c3b7
14570 changed files with 153136 additions and 63871 deletions
9
Task/Combinations/Zkl/combinations-1.zkl
Normal file
9
Task/Combinations/Zkl/combinations-1.zkl
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
fcn comb(k,seq){ // no repeats, seq is finite
|
||||
seq=seq.makeReadOnly(); // because I append to parts of seq
|
||||
fcn(k,seq){
|
||||
if(k<=0) return(T(T));
|
||||
if(not seq) return(T);
|
||||
self.fcn(k-1,seq[1,*]).pump(List,seq[0,1].extend)
|
||||
.extend(self.fcn(k,seq[1,*]));
|
||||
}(k,seq);
|
||||
}
|
||||
1
Task/Combinations/Zkl/combinations-2.zkl
Normal file
1
Task/Combinations/Zkl/combinations-2.zkl
Normal file
|
|
@ -0,0 +1 @@
|
|||
comb(3,"abcde".split("")).apply("concat")
|
||||
Loading…
Add table
Add a link
Reference in a new issue