Compare commits

...

3 Commits

Author SHA1 Message Date
Tristan B. Velloza Kildaire 943a16beb6 Merge branch 'master' into feature/tree 2024-04-27 15:49:48 +02:00
Tristan B. Velloza Kildaire 6b12529ec3
niknaks.arrays (#20)
- Added array stuff
2024-04-27 15:48:39 +02:00
Tristan B. Velloza Kildaire 930fa1ace5 niknaks.arrays
- Added this
2024-04-27 15:46:28 +02:00
1 changed files with 11 additions and 0 deletions

View File

@ -455,6 +455,17 @@ unittest
assert(numbas == [1, 2]);
}
/**
* Removes the element at the
* provided position in the
* given array
*
* Params:
* array = the array
* position = position of
* element to remove
* Returns: the array
*/
public T[] removeResize(T)(T[] array, size_t position)
{
return array.shiftInto(position, false, true);