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

VladD2 svnadmin at nemerle.org
Sat Oct 28 12:14:17 CEST 2006


Log:
Implement System.IEquatable ['a] in list ['a].

Author: VladD2
Date: Sat Oct 28 12:14:15 2006
New Revision: 6802

Modified:
   nemerle/trunk/lib/list.n

Modified: nemerle/trunk/lib/list.n
==============================================================================
--- nemerle/trunk/lib/list.n	(original)
+++ nemerle/trunk/lib/list.n	Sat Oct 28 12:14:15 2006
@@ -45,7 +45,10 @@
   [System.Serializable]
   [System.Runtime.InteropServices.ComVisible(false)]
   [DebuggerDisplay("Length = {Length}: {ToString()}"), DebuggerNonUserCode]
-  public variant list ['a] : SCG.IEnumerable ['a], Nemerle.Collections.ICovariantList ['a]
+  public variant list ['a] : 
+    SCG.IEnumerable ['a], 
+    Nemerle.Collections.ICovariantList ['a],
+    System.IEquatable ['a]
     // , Nemerle.Collections.ICovariantEnumerable ['a] //unfortunately this is prevented by MS.NET bug
   {
     [System.Serializable, DebuggerNonUserCode]
@@ -96,16 +99,16 @@
     }
 
     [Nemerle.OverrideObjectEquals]
-    public Equals (o : list ['a]) : bool
+    public Equals (other : list ['a]) : bool
     {
       match (this) {
         | x :: xs =>
-          match (o) {
+          match (other) {
             | y :: ys when x.Equals (y) => xs.Equals (ys)
             | _ => false
           }
           
-        | [] => o.IsEmpty
+        | [] => other.IsEmpty
       }
     }
 



More information about the svn mailing list