summaryrefslogtreecommitdiff
path: root/src/cli/runtime/RT.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/cli/runtime/RT.cs')
-rw-r--r--src/cli/runtime/RT.cs11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/cli/runtime/RT.cs b/src/cli/runtime/RT.cs
index 36387c55..be8e85cb 100644
--- a/src/cli/runtime/RT.cs
+++ b/src/cli/runtime/RT.cs
@@ -65,6 +65,17 @@ public class RT
// ?T:null;
// }
+static public ISeq seq(Object coll) {
+ if(coll == null || coll is ISeq)
+ return (ISeq) coll;
+ else if(coll is ISequential)
+ return ((ISequential) coll).seq();
+ else if(coll is Object[])
+ return ArraySeq.create((Object[]) coll);
+ else
+ throw new ArgumentException("Don't know how to create ISeq from arg");
+}
+
static public Iter iter(Object coll)
{
if (coll == null || coll is Iter)