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.cs8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/cli/runtime/RT.cs b/src/cli/runtime/RT.cs
index 11aa7bda..d6b4ee35 100644
--- a/src/cli/runtime/RT.cs
+++ b/src/cli/runtime/RT.cs
@@ -137,6 +137,14 @@ static public Cons listStar(Object arg1, Object arg2, Object arg3, Object arg4,
return cons(arg1, cons(arg2, cons(arg3, cons(arg4, cons(arg5, rest)))));
}
+static public Cons arrayToList(Object[] a)
+ {
+ Cons ret = null;
+ for (int i = a.Length - 1; i >= 0; --i)
+ ret = cons(a[i], ret);
+ return ret;
+ }
+
static public int length(Cons list)
{
int i = 0;