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/ArraySeq.cs | |
parent | be12a746746c53c1f00758df7daa1fa5edc03935 (diff) |
made seq.count constant-time
Diffstat (limited to 'src/cli/runtime/ArraySeq.cs')
-rw-r--r-- | src/cli/runtime/ArraySeq.cs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/cli/runtime/ArraySeq.cs b/src/cli/runtime/ArraySeq.cs index 144d872f..4503792e 100644 --- a/src/cli/runtime/ArraySeq.cs +++ b/src/cli/runtime/ArraySeq.cs @@ -50,6 +50,10 @@ override public ISeq rest() { // return _rest;
}
+public override int count() {
+ return array.Length - i;
+}
+
public int index(){
return i;
}
|