diff options
| author | Rich Hickey <richhickey@gmail.com> | 2006-05-05 19:35:42 +0000 |
|---|---|---|
| committer | Rich Hickey <richhickey@gmail.com> | 2006-05-05 19:35:42 +0000 |
| commit | b5867713b47e73335a0ced582741e6cae0769c0e (patch) | |
| tree | 86a338f040f62dd8c6cb70cb3b3241c2110487a4 /src/cli/runtime | |
| parent | 6758d50fecc5b042a3d880ca9bf0fe17014aec1a (diff) | |
added quote, RT.arrayToList
Diffstat (limited to 'src/cli/runtime')
| -rw-r--r-- | src/cli/runtime/RT.cs | 8 |
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;
|
