Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
|
|
@ -0,0 +1,9 @@
|
|||
fcn non_continuous_subsequences(ary){
|
||||
pwerSet(ary).filter(fcn(list){(not isContinuous(list)) })
|
||||
}
|
||||
fcn isContinuous(ary){
|
||||
if(ary.len()<2) return(True);
|
||||
foreach n in (ary.len()-1){ if(1+ary[n]!=ary[n+1]) return(False); }
|
||||
return(True);
|
||||
}
|
||||
non_continuous_subsequences(T(1,2,3,4)).println();
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
fcn pwerSet(list){
|
||||
(0).pump(list.len(),List,List,Utils.Helpers.pickNFrom.fp1(list),
|
||||
T(T,Void.Write,Void.Write) ) .append(list)
|
||||
}
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
fcn brokenSubsequences(str){
|
||||
pwerSet(str.split("")).apply("concat")
|
||||
.filter('wrap(substr){ (not str.holds(substr)) })
|
||||
}
|
||||
brokenSubsequences("1234").println();
|
||||
Loading…
Add table
Add a link
Reference in a new issue