Data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 7387c8f97b
commit cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions

View file

@ -0,0 +1,11 @@
nds:=File("daysOfWeek.txt").read().howza(11) // stripped lines
.pump(List,Void.Filter,fcn(day){
d,N,m := day.split(),d.len(),(0).max(d.apply("len")); // N==7
foreach n in ([1..m]){
ds:=d.apply("get",0,n); // ("Su","Mo","Tu","We","Th","Fr","Sa")
foreach a,b in (N,[a+1..N-1]){ if(ds[a]==ds[b]) continue(3); } # Th==Fr?
return(n,day); // part way though the words and found unique
}
return(m,day); // no match nowhere
});
foreach n,s in (nds){ println("%3d %s".fmt(n,s)); }