diff options
author | Rich Hickey <richhickey@gmail.com> | 2006-08-09 14:45:16 +0000 |
---|---|---|
committer | Rich Hickey <richhickey@gmail.com> | 2006-08-09 14:45:16 +0000 |
commit | b9b9ceb459f528347f2433357697370fa3fa67b4 (patch) | |
tree | 0ebad3922bec9d4ec43d2d3c4ae372d53a204ea1 /src/cli/runtime/MapEntry.cs | |
parent | be12a746746c53c1f00758df7daa1fa5edc03935 (diff) |
made seq.count constant-time
Diffstat (limited to 'src/cli/runtime/MapEntry.cs')
-rw-r--r-- | src/cli/runtime/MapEntry.cs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/cli/runtime/MapEntry.cs b/src/cli/runtime/MapEntry.cs index 88358b27..1ff7f93a 100644 --- a/src/cli/runtime/MapEntry.cs +++ b/src/cli/runtime/MapEntry.cs @@ -111,7 +111,7 @@ override public ISeq seq() { }
class Seq : ASeq{
- MapEntry e;
+ readonly MapEntry e;
public Seq(MapEntry e) {
this.e = e;
@@ -124,6 +124,11 @@ class Seq : ASeq{ override public ISeq rest() {
return null;
}
+
+ override public int count(){
+ return 1;
+ }
+
}
}
|