Thread: [Nice-commit] Nice/stdlib/nice/lang array.nice,1.36,1.37 bigint.nice,1.4,1.5 booleans.nice,1.15,1.16
Brought to you by:
bonniot
From: Arjan B. <ar...@us...> - 2004-07-29 12:36:22
|
Update of /cvsroot/nice/Nice/stdlib/nice/lang In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27720/F:/nice/stdlib/nice/lang Modified Files: array.nice bigint.nice booleans.nice collections.nice numeric.nice Log Message: Removed usage of old pattern syntax. Index: collections.nice =================================================================== RCS file: /cvsroot/nice/Nice/stdlib/nice/lang/collections.nice,v retrieving revision 1.70 retrieving revision 1.71 diff -C2 -d -r1.70 -r1.71 *** collections.nice 27 Jun 2004 17:34:34 -0000 1.70 --- collections.nice 29 Jul 2004 12:36:12 -0000 1.71 *************** *** 129,133 **** ****************************************************************/ ! <T> foreach(col...@ja...llection, action) { for (T elem : collection) --- 129,133 ---- ****************************************************************/ ! <T> foreach(java.util.Collection collection, action) { for (T elem : collection) *************** *** 162,174 **** } ! similarEmptyCollection(c#ArrayList) = new ArrayList(c.size()); ! similarEmptyCollection(c#LinkedList) = new LinkedList(); ! similarEmptyCollection(c#Vector) = new Vector(c.size()); ! similarEmptyCollection(c#Stack) = new Stack(); ! similarEmptyCollection(c#HashSet) = new HashSet(c.size()); /**************************************************************** --- 162,174 ---- } ! similarEmptyCollection(#ArrayList c) = new ArrayList(c.size()); ! similarEmptyCollection(#LinkedList c) = new LinkedList(); ! similarEmptyCollection(#Vector c) = new Vector(c.size()); ! similarEmptyCollection(#Stack c) = new Stack(); ! similarEmptyCollection(#HashSet c) = new HashSet(c.size()); /**************************************************************** Index: array.nice =================================================================== RCS file: /cvsroot/nice/Nice/stdlib/nice/lang/array.nice,v retrieving revision 1.36 retrieving revision 1.37 diff -C2 -d -r1.36 -r1.37 *** array.nice 23 Jul 2004 23:29:00 -0000 1.36 --- array.nice 29 Jul 2004 12:36:12 -0000 1.37 *************** *** 89,95 **** // Define collection methods ! <C,T,U> map(a@Array, func) = fill(new U[a.length], int i => func(a[i])); ! <C,T,U> filter(a@Array, test) { int l = a.length; --- 89,95 ---- // Define collection methods ! <C,T,U> map(Array a, func) = fill(new U[a.length], int i => func(a[i])); ! <C,T,U> filter(Array a, test) { int l = a.length; Index: booleans.nice =================================================================== RCS file: /cvsroot/nice/Nice/stdlib/nice/lang/booleans.nice,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** booleans.nice 19 Nov 2003 16:04:46 -0000 1.15 --- booleans.nice 29 Jul 2004 12:36:12 -0000 1.16 *************** *** 32,39 **** */ ! `!`(b@boolean) = b ? false : true; ! `&`(b1@boolean,b2@boolean) = b1 ? b2 : false; ! `|`(b1@boolean,b2@boolean) = b1 ? true : b2; ! `^`(b1@boolean,b2@boolean) = b1 ? !b2 : b2; // same methods, but overloaded for better efficiency (no dispatch and no boxing). --- 32,39 ---- */ ! `!`(boolean b) = b ? false : true; ! `&`(boolean b1, boolean b2) = b1 ? b2 : false; ! `|`(boolean b1, boolean b2) = b1 ? true : b2; ! `^`(boolean b1, boolean b2) = b1 ? !b2 : b2; // same methods, but overloaded for better efficiency (no dispatch and no boxing). *************** *** 46,48 **** boolean `||`(boolean, boolean) = inline nice.lang.inline.ShortCircuitOp("||"); ! `<`(b1@boolean, b2@boolean) = b2 || !b1; --- 46,48 ---- boolean `||`(boolean, boolean) = inline nice.lang.inline.ShortCircuitOp("||"); ! `<`(boolean b1 ,boolean b2) = b2 || !b1; Index: numeric.nice =================================================================== RCS file: /cvsroot/nice/Nice/stdlib/nice/lang/numeric.nice,v retrieving revision 1.33 retrieving revision 1.34 diff -C2 -d -r1.33 -r1.34 *** numeric.nice 19 Nov 2003 16:04:45 -0000 1.33 --- numeric.nice 29 Jul 2004 12:36:12 -0000 1.34 *************** *** 220,224 **** // Comparable interface ! `<`(n1@Number, n2@Number) = n1.doubleValue() < n2.doubleValue(); // exponential functions --- 220,224 ---- // Comparable interface ! `<`(Number n1, Number n2) = n1.doubleValue() < n2.doubleValue(); // exponential functions Index: bigint.nice =================================================================== RCS file: /cvsroot/nice/Nice/stdlib/nice/lang/bigint.nice,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** bigint.nice 19 Nov 2003 16:04:46 -0000 1.4 --- bigint.nice 29 Jul 2004 12:36:12 -0000 1.5 *************** *** 47,49 **** implementations that use < and boolean negation. */ ! `<`(x@BigInteger, y@BigInteger) = x.compareTo(y) < 0; --- 47,49 ---- implementations that use < and boolean negation. */ ! `<`(BigInteger x, BigInteger y) = x.compareTo(y) < 0; |