Data update

This commit is contained in:
Ingy döt Net 2026-04-30 12:34:36 -04:00
parent 4bb20c9b71
commit cbaf4c4b64
12390 changed files with 318560 additions and 27248 deletions

View file

@ -3,6 +3,6 @@ fcn addItem(old,[(nm,w,v,c)]){ // old:list:(cost of:,(name,#,...))
wi,left,right:=w*i,list[0,wi],list[wi,*];
new:=old.apply('wrap([(val,itms)]){ T(val + v*i,itms.append(nm,i)) });
left.extend(right.zipWith( // inc
fcn([(v1,_)]a,[(v2,_)]b){ v1>v2 and a or b },new));
fcn([(v1,_)]a,[(v2,_)]b){ v1>v2 and a or b },new));
},old,nm,w,v,old);
}//--> new list