[svn] r6790: nemerle/trunk/lib/list.n
VladD2
svnadmin at nemerle.org
Thu Oct 26 14:08:03 CEST 2006
Log:
Add equality operators to list[].
Author: VladD2
Date: Thu Oct 26 14:08:01 2006
New Revision: 6790
Modified:
nemerle/trunk/lib/list.n
Modified: nemerle/trunk/lib/list.n
==============================================================================
--- nemerle/trunk/lib/list.n (original)
+++ nemerle/trunk/lib/list.n Thu Oct 26 14:08:01 2006
@@ -75,6 +75,26 @@
get { Tail }
}
+ public static @== (x : list ['a], y : list ['a]) : bool
+ {
+ if (x : object == null)
+ y : object == null
+ else if (y : object == null)
+ false
+ else
+ x.Equals(y)
+ }
+
+ public static @!= (x : list ['a], y : list ['a]) : bool
+ {
+ if (x : object == null)
+ y : object != null
+ else if (y : object == null)
+ true
+ else
+ !x.Equals(y)
+ }
+
[Nemerle.OverrideObjectEquals]
public Equals (o : list ['a]) : bool
{
More information about the svn
mailing list