[Nice-commit] Nice/stdlib/nice/lang array.nice,1.28,1.29
Brought to you by:
bonniot
From: <bo...@us...> - 2003-09-11 20:51:00
|
Update of /cvsroot/nice/Nice/stdlib/nice/lang In directory sc8-pr-cvs1:/tmp/cvs-serv27659/stdlib/nice/lang Modified Files: array.nice Log Message: Replaced functions by methods with a default implementation. Index: array.nice =================================================================== RCS file: /cvsroot/nice/Nice/stdlib/nice/lang/array.nice,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** array.nice 3 Sep 2003 23:26:30 -0000 1.28 --- array.nice 11 Sep 2003 20:50:27 -0000 1.29 *************** *** 86,94 **** <C,T,U> map(a@Array, func) = fill(new U[a.length], int i => func(a[i])); ! <C,T> filter(a@Array, test) = a.filter(test); ! ! // Specialized versions for arrays. ! ! <T> T[] filter(T[] a, T -> boolean test) { int l = a.length; --- 86,90 ---- <C,T,U> map(a@Array, func) = fill(new U[a.length], int i => func(a[i])); ! <C,T> filter(a@Array, test) { int l = a.length; |