diff options
Diffstat (limited to 'src/cli/runtime/Tuple.cs')
-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){
|