diff options
Diffstat (limited to 'Binaries')
-rw-r--r-- | Binaries/DafnyRuntime.cs | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/Binaries/DafnyRuntime.cs b/Binaries/DafnyRuntime.cs index d6bd895a..f00db25a 100644 --- a/Binaries/DafnyRuntime.cs +++ b/Binaries/DafnyRuntime.cs @@ -1,4 +1,5 @@ -using System.Numerics;
+using System; // for Func
+using System.Numerics;
namespace Dafny
{
@@ -27,7 +28,7 @@ namespace Dafny d[t] = true;
return new Set<T>(d);
}
-
+
public IEnumerable<T> Elements {
get {
return dict.Keys;
@@ -636,7 +637,16 @@ namespace Dafny {
return u;
}
+
+ public static U Let<T, U>(T t, Func<T,U> f) {
+ return f(t);
+ }
+
public delegate Result Function<Input,Result>(Input input);
+
+ public static A Id<A>(A a) {
+ return a;
+ }
}
public struct BigRational
|