diff options
Diffstat (limited to 'src/cli/runtime/Cons.cs')
-rw-r--r-- | src/cli/runtime/Cons.cs | 31 |
1 files changed, 27 insertions, 4 deletions
diff --git a/src/cli/runtime/Cons.cs b/src/cli/runtime/Cons.cs index eec4e475..117ad95d 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
+public class Cons : AMap,Iter,ISeq
{ public Object first; @@ -25,8 +25,31 @@ public Cons(Object first, Cons rest) { this.first = first; this.rest = rest; - } - -} + }
+
+
+#region Iter Members
+
+public object get()
+ {
+ return first;
+ }
+
+public Iter iterate()
+ {
+ return rest;
+ }
+
+#endregion
+
+#region ISeq Members
+
+public Iter iter()
+ {
+ return this;
+ }
+
+#endregion
+ } } |