[Nice-commit] Nice/regtest/basic arrays.nice,1.22,1.23
Brought to you by:
bonniot
From: <bo...@us...> - 2003-08-29 14:07:44
|
Update of /cvsroot/nice/Nice/regtest/basic In directory sc8-pr-cvs1:/tmp/cvs-serv16744/regtest/basic Modified Files: arrays.nice Log Message: Avoid clash with Collections.reverse. Index: arrays.nice =================================================================== RCS file: /cvsroot/nice/Nice/regtest/basic/arrays.nice,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** arrays.nice 25 Aug 2003 23:43:36 -0000 1.22 --- arrays.nice 29 Aug 2003 14:07:39 -0000 1.23 *************** *** 13,17 **** } ! <Any T> Array<T> reverse(Array<T>); /* this is an interesting case to keep: dispatch on Array for a method that only accepts (polymorphic) arrays. --- 13,17 ---- } ! <Any T> Array<T> rev(Array<T>); /* this is an interesting case to keep: dispatch on Array for a method that only accepts (polymorphic) arrays. *************** *** 19,23 **** while it would be rawArray if the domain of the method was bigger. */ ! <T> reverse(a@Array) { T[] res = fill(new T[a.length], int i => a[a.length - i - 1]); --- 19,23 ---- while it would be rawArray if the domain of the method was bigger. */ ! <T> rev(a@Array) { T[] res = fill(new T[a.length], int i => a[a.length - i - 1]); *************** *** 32,36 **** int[] a = test_native_arrays(); p(a); ! p(reverse(a)); test_collection_arrays(a); test_polymorphism(); --- 32,36 ---- int[] a = test_native_arrays(); p(a); ! p(rev(a)); test_collection_arrays(a); test_polymorphism(); *************** *** 94,98 **** int[] b = map(a, int i => i+4); p(b); ! p(filter(reverse(b), int i=> i>6)); long[] ls = map(a, id); --- 94,98 ---- int[] b = map(a, int i => i+4); p(b); ! p(filter(rev(b), int i=> i>6)); long[] ls = map(a, id); |