summaryrefslogtreecommitdiff
path: root/src/cli
diff options
context:
space:
mode:
authorRich Hickey <richhickey@gmail.com>2006-04-04 12:06:02 +0000
committerRich Hickey <richhickey@gmail.com>2006-04-04 12:06:02 +0000
commitc8c1b1b1a92e943e4527ef0c3a1089922421f2e5 (patch)
tree74b16e06af139f078f037b996f52125bf9a3ce31 /src/cli
parentb46c8d81cb7815d654e5cb77fa6f26edbd1d2944 (diff)
Removed ISeq
Diffstat (limited to 'src/cli')
-rw-r--r--src/cli/runtime/AGenerator.cs14
-rw-r--r--src/cli/runtime/Cons.cs10
-rw-r--r--src/cli/runtime/ISeq.cs20
-rw-r--r--src/cli/runtime/RT.cs6
4 files changed, 4 insertions, 46 deletions
diff --git a/src/cli/runtime/AGenerator.cs b/src/cli/runtime/AGenerator.cs
index 3c051e5c..1cd9ee9a 100644
--- a/src/cli/runtime/AGenerator.cs
+++ b/src/cli/runtime/AGenerator.cs
@@ -4,23 +4,11 @@ using System.Text;
namespace org.clojure.runtime
{
-public abstract class AGenerator : ISeq, Iter{
+public abstract class AGenerator : Iter{
Object __val;
int __state = 0;
-
-
- #region ISeq Members
-
- public Iter iter()
- {
- //generators get 'primed' by calling iterate once, which pulls up to first yield
- return iterate();
- }
-
- #endregion
-
#region Iter Members
public object get()
diff --git a/src/cli/runtime/Cons.cs b/src/cli/runtime/Cons.cs
index 117ad95d..331e3073 100644
--- a/src/cli/runtime/Cons.cs
+++ b/src/cli/runtime/Cons.cs
@@ -15,7 +15,7 @@ using System;
namespace org.clojure.runtime
{
-public class Cons : AMap,Iter,ISeq
+public class Cons : AMap,Iter
{
public Object first;
@@ -42,14 +42,6 @@ public Iter iterate()
#endregion
-#region ISeq Members
-
-public Iter iter()
- {
- return this;
- }
-
-#endregion
}
}
diff --git a/src/cli/runtime/ISeq.cs b/src/cli/runtime/ISeq.cs
deleted file mode 100644
index cbde40c9..00000000
--- a/src/cli/runtime/ISeq.cs
+++ /dev/null
@@ -1,20 +0,0 @@
-/**
- * Copyright (c) Rich Hickey. All rights reserved.
- * The use and distribution terms for this software are covered by the
- * Common Public License 1.0 (http://opensource.org/licenses/cpl.php)
- * which can be found in the file CPL.TXT at the root of this distribution.
- * By using this software in any fashion, you are agreeing to be bound by
- * the terms of this license.
- * You must not remove this notice, or any other, from this software.
- **/
-
-using System;
-
-namespace org.clojure.runtime
- {
- interface ISeq
- {
- Iter iter();
-
- }
- }
diff --git a/src/cli/runtime/RT.cs b/src/cli/runtime/RT.cs
index 544cba51..2d4e2180 100644
--- a/src/cli/runtime/RT.cs
+++ b/src/cli/runtime/RT.cs
@@ -55,10 +55,8 @@ public class RT
static public Iter iter(Object coll)
{
- if (coll == null)
- return null;
- else if (coll is ISeq)
- return ((ISeq)coll).iter();
+ if (coll == null || coll is Iter)
+ return (Iter)coll;
else if (coll is IEnumerable)
{
IEnumerator e = ((IEnumerable)coll).GetEnumerator();