-
Notifications
You must be signed in to change notification settings - Fork 22
Open
Description
Some of the docblocks have drifted away from the implementation.
The most common cause of this drift is functions that have been changed to take Containers instead of Traversables.
/**
* Returns a new vec containing the subsequence of the given Traversable
* determined by the offset and length.
*
* If no length is given or it exceeds the upper bound of the Traversable,
* the vec will contain every element after the offset.
*
* - To take only the first `$n` elements, see `Vec\take()`.
* - To drop the first `$n` elements, see `Vec\drop()`.
*
* Time complexity: O(n), where n is the size of the slice
* Space complexity: O(n), where n is the size of the slice
*/
<<__Rx>>
function slice<Tv>(
Container<Tv> $container, // I am Container<T>, not Traversable<T>
int $offset,
?int $length = null,
): vec<Tv>;I will have a look at this later, when I have some time to kill.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels