[svn] r6390: nemerle/trunk/lib/LazyValue.n
nazgul
svnadmin at nemerle.org
Sun Jun 11 21:29:04 CEST 2006
Log:
Add implicit operator to LazyValue
Author: nazgul
Date: Sun Jun 11 21:29:02 2006
New Revision: 6390
Modified:
nemerle/trunk/lib/LazyValue.n
Modified: nemerle/trunk/lib/LazyValue.n
==============================================================================
--- nemerle/trunk/lib/LazyValue.n (original)
+++ nemerle/trunk/lib/LazyValue.n Sun Jun 11 21:29:02 2006
@@ -46,7 +46,7 @@
}
/// Create already initialized value
- public static FromValue ['b] (val : 'b) : LazyValue ['b]
+ public static FromValue (val : 'a) : LazyValue ['a]
{
LazyValue (val, null)
}
@@ -57,10 +57,14 @@
computation = fn;
}
- public static @: ['b] (x : LazyValue ['b]) : 'b {
+ public static @: (x : LazyValue ['a]) : 'a {
x.Value
}
+ public static @: (x : 'a) : LazyValue ['a] {
+ FromValue (x)
+ }
+
public override ToString () : string {
Value.ToString ()
}
More information about the svn
mailing list