[svn] r7200: nemerle/trunk/lib/list.n

malekith svnadmin at nemerle.org
Thu Jan 4 11:50:30 CET 2007


Log:
Fix a typo in List.Combine name. Make Concat, Flatten, Split and Combine extension methods (they cannot be member methods).

Author: malekith
Date: Thu Jan  4 11:50:30 2007
New Revision: 7200

Modified:
   nemerle/trunk/lib/list.n

Modified: nemerle/trunk/lib/list.n
==============================================================================
--- nemerle/trunk/lib/list.n	(original)
+++ nemerle/trunk/lib/list.n	Thu Jan  4 11:50:30 2007
@@ -825,7 +825,7 @@
      * Makes list one level more flat, i.e. Concat([[1;2];[3;4]]) = [1;2;3;4].
      * Does not work deeper, i.e. Concat([[[1;2];[3]];[[4]]]) = [[1;2];[3];[4]].
      */
-    public Concat['a] (l : list [list ['a]]) : list ['a]
+    public Concat['a] (this l : list [list ['a]]) : list ['a]
     {
       FoldLeft (l, [], fun (x, y) { Append (y, x) })
     }    
@@ -834,7 +834,7 @@
     /**
      * Alias for Concat(l).
      */
-    public Flatten ['a] (l : list [list ['a]]) : list ['a]
+    public Flatten ['a] (this l : list [list ['a]]) : list ['a]
     {
       Concat (l)
     }
@@ -1234,7 +1234,7 @@
     /* -- LISTS OF PAIRS --------------------------------------------------- */
 
     
-    public Split['a, 'b] (l : list ['a * 'b]) : list ['a] * list ['b] {
+    public Split['a, 'b] (this l : list ['a * 'b]) : list ['a] * list ['b] {
       def loop (acc1 : list ['a], acc2 : list ['b], l : list ['a * 'b]) 
       {
         match (l) {
@@ -1245,7 +1245,7 @@
       loop([], [], l)
     }
 
-    public Combineb ['a, 'b] (a : list ['a], b : list ['b]) : list ['a * 'b] {
+    public Combine ['a, 'b] (this a : list ['a], b : list ['b]) : list ['a * 'b] {
       def loop (acc : list ['a * 'b], a : list ['a], b : list ['b]) : list ['a * 'b]
       {
         match ((a, b)) {



More information about the svn mailing list