wdte
wdte copied to clipboard
std/arrays: new module for dealing with arrays
There should be an array module in the standard library for dealing with arrays in various ways. Specifically, it should have support for at least the following:
- [x] ~Accessing a specific index.~ Dropped in favor of
atinstd. See #72. - [x] ~Getting the length of an array.~ Dropped in favor of
leninstd. See #72. - [x] Sorting.
- [ ] Run an array as if it was a compound.
May also want to move the creation of streams from arrays from the stream module to this one.
A few more:
- [x]
concat. Alternatively, just stick this in+instdalong with string concatenation. - [x] ~
append. Similar toappend()in Go. Need to make sure that slicing changes the capacity as well to make sure that this doesn't modify parts of existing slices.~ Dropped in favor ofconcat. See #122.
Even more:
- [ ]
streamReverse. Streams the array from the last index to the first.