diff options
| author | Rich Hickey <richhickey@gmail.com> | 2006-07-27 22:21:53 +0000 |
|---|---|---|
| committer | Rich Hickey <richhickey@gmail.com> | 2006-07-27 22:21:53 +0000 |
| commit | f0ebcbc30c8f2ae9144259caed61495ef753ab72 (patch) | |
| tree | ce8d3a7e5e5fa48d1482676d19236c56364c9e8e /src/cli/runtime | |
| parent | 3224d6ff2e2e28a6e283a3106992dc0545d4e1b6 (diff) | |
made set() return Tuple
Diffstat (limited to 'src/cli/runtime')
| -rw-r--r-- | src/cli/runtime/Tuple.cs | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/cli/runtime/Tuple.cs b/src/cli/runtime/Tuple.cs index 1ee8de4f..59799b30 100644 --- a/src/cli/runtime/Tuple.cs +++ b/src/cli/runtime/Tuple.cs @@ -37,14 +37,11 @@ public Object get(int i){ return array[i];
}
-/**
- *
- * @param i
- * @param val
- * @return a PersistentArray
- */
+
public IArray set(int i, Object val) {
- return (new PersistentArray(this)).set(i, val);
+ Object[] newArray = (Object[])array.Clone();
+ newArray[i] = val;
+ return new Tuple(newArray);
}
override public bool Equals(Object key){
|
