[q-lang-cvs] q/stdlib bag.q, 1.6, 1.7 dict.q, 1.6, 1.7 hdict.q, 1.7, 1.8 set.q, 1.7, 1.8
Brought to you by:
agraef
From: Albert G. <ag...@us...> - 2008-02-21 09:03:23
|
Update of /cvsroot/q-lang/q/stdlib In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv17251 Modified Files: bag.q dict.q hdict.q set.q Log Message: bugfixes Index: bag.q =================================================================== RCS file: /cvsroot/q-lang/q/stdlib/bag.q,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** bag.q 21 Feb 2008 07:58:13 -0000 1.6 --- bag.q 21 Feb 2008 09:03:04 -0000 1.7 *************** *** 292,302 **** last (bin _ _ _ M2) = last M2 otherwise; ! rmlast Xs = fst (rmlasta Xs); ! rmfirst Xs = fst (rmfirsta Xs); ! insert Xs Y = fst (inserta Xs Y); ! delete Xs Y = fst (deletea Xs Y); /* bag comparison, union, difference and intersection: */ --- 292,302 ---- last (bin _ _ _ M2) = last M2 otherwise; ! rmlast M:Bag = fst (rmlasta M); ! rmfirst M:Bag = fst (rmfirsta M); ! insert M:Bag Y = fst (inserta M Y); ! delete M:Bag Y = fst (deletea M Y); /* bag comparison, union, difference and intersection: */ Index: hdict.q =================================================================== RCS file: /cvsroot/q-lang/q/stdlib/hdict.q,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** hdict.q 21 Feb 2008 07:58:13 -0000 1.7 --- hdict.q 21 Feb 2008 09:03:07 -0000 1.8 *************** *** 341,345 **** emptyhdict = nil; hdict XYs:List = foldl insert nil XYs; ! mkhdict Y Xs = hdict (zip Xs (mklist Y (#Xs))); ishdict _:HDict = true; --- 341,345 ---- emptyhdict = nil; hdict XYs:List = foldl insert nil XYs; ! mkhdict Y Xs:List = hdict (zip Xs (mklist Y (#Xs))); ishdict _:HDict = true; Index: dict.q =================================================================== RCS file: /cvsroot/q-lang/q/stdlib/dict.q,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** dict.q 21 Feb 2008 07:58:13 -0000 1.6 --- dict.q 21 Feb 2008 09:03:07 -0000 1.7 *************** *** 285,289 **** dict Members:List = foldl insert emptydict Members; ! mkdict Val Keys = dict (zip Keys (mklist Val (#Keys))); #nil = 0; --- 285,289 ---- dict Members:List = foldl insert emptydict Members; ! mkdict Val Keys:List = dict (zip Keys (mklist Val (#Keys))); #nil = 0; *************** *** 323,326 **** first (bin _ _ _ L _) = first L; ! insert D (Key, Val) = fst (inserta D Key Val); ! update D KV = insert D KV; --- 323,326 ---- first (bin _ _ _ L _) = first L; ! insert D:Dict (Key, Val) = fst (inserta D Key Val); ! update D:Dict KV = insert D KV; Index: set.q =================================================================== RCS file: /cvsroot/q-lang/q/stdlib/set.q,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** set.q 21 Feb 2008 07:58:13 -0000 1.7 --- set.q 21 Feb 2008 09:03:08 -0000 1.8 *************** *** 293,303 **** last (bin _ _ _ M2) = last M2 otherwise; ! rmlast Xs = fst (rmlasta Xs); ! rmfirst Xs = fst (rmfirsta Xs); ! insert Xs Y = fst (inserta Xs Y); ! delete Xs Y = fst (deletea Xs Y); /* Set comparison, union, difference and intersection: */ --- 293,303 ---- last (bin _ _ _ M2) = last M2 otherwise; ! rmlast M:Set = fst (rmlasta M); ! rmfirst M:Set = fst (rmfirsta M); ! insert M:Set Y = fst (inserta M Y); ! delete M:Set Y = fst (deletea M Y); /* Set comparison, union, difference and intersection: */ |