Skip to content

Commit 735874b

Browse files
committed
changed remove to testable
1 parent 5636e1d commit 735874b

File tree

3 files changed

+18
-3
lines changed

3 files changed

+18
-3
lines changed

README.md

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -627,4 +627,19 @@ Even though it only takes one argument to append, it can be extended with the sp
627627
4
628628
>> do(r)
629629
[4,1,2,3]
630-
```
630+
```
631+
632+
###put(list, arg1)
633+
634+
The *put()* functin appends one argument, to the left or beginning of a list. It can be extended with *args()*. It is non-nestable.
635+
636+
```
637+
>> =(a, range(0, 7))
638+
undefined
639+
>> put(a, 4), do(a)
640+
[4,0,1,2,3,4,5,6]
641+
```
642+
643+
###insert(list, index, value)
644+
645+
The *insert()* function takes a list, a number index, and a value, to insert that value at that index, while moving all other values one over to accomodate for the new value. It is non-nestable

builds/WebMain.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -397,7 +397,7 @@ var STD = {
397397
//returns removed element
398398
"remove":function(args){
399399
var elems = get2Args(this, args);
400-
return elems[0] + ".splice(" + elems[1] + ",1," + ");";
400+
return elems[0] + ".splice(" + elems[1] + ",1," + ")";
401401
},
402402
//FIND FUNCTION works on lists or strings
403403
//returns -1 if not found, otherwise return first index.

src/stdlib.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ var STD = {
275275
//returns removed element
276276
"remove":function(args){
277277
var elems = get2Args(this, args);
278-
return elems[0] + ".splice(" + elems[1] + ",1," + ");";
278+
return elems[0] + ".splice(" + elems[1] + ",1," + ")";
279279
},
280280
//FIND FUNCTION works on lists or strings
281281
//returns -1 if not found, otherwise return first index.

0 commit comments

Comments
 (0)