summaryrefslogtreecommitdiff
path: root/src/cli/runtime/ASeq.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/cli/runtime/ASeq.cs')
-rw-r--r--src/cli/runtime/ASeq.cs23
1 files changed, 16 insertions, 7 deletions
diff --git a/src/cli/runtime/ASeq.cs b/src/cli/runtime/ASeq.cs
index 9636e80b..18c307d6 100644
--- a/src/cli/runtime/ASeq.cs
+++ b/src/cli/runtime/ASeq.cs
@@ -13,25 +13,34 @@ using System;
namespace clojure.lang
{
-public abstract class ASeq : ISeq{
-
-public Object peek() {
+public abstract class ASeq : Obj, ISeq{
+
+ public override Obj withMeta(IPersistentMap meta)
+ {
+ if(_meta == meta)
+ return this;
+ Obj ret = (Obj)MemberwiseClone();
+ ret._meta = meta;
+ return ret;
+ }
+
+public virtual Object peek() {
return first();
}
-public IPersistentList pop() {
+public virtual IPersistentList pop() {
return rest();
}
-public int count() {
+public virtual int count() {
return 1 + RT.count(rest());
}
-public ISeq seq() {
+public virtual ISeq seq() {
return this;
}
-public IPersistentCollection cons(Object o) {
+public virtual IPersistentCollection cons(Object o) {
return new Cons(o, this);
}