You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
All collections (CString, SmartString, Umbra, Vector, List) should support one of these operations:
# Creates a new collection by copying all the data in the range from the old collection
let .sublist(self: t, begin: USize, len: USize): t
# dest needs to have `.push(t,x):t` (like `Vector<x>`)
let .copy-range-to(self: t, begin: USize, len: USize, dest: d): d
I see that there is a [:] operator. Maybe that could be used for this.
This should also be added to the standard library:
let .copy-range-to(self: t, begin: USize, len: USize, dest: d): d= (
let i = 0;
while i < len {
let x = self[i + begin];
dest = dest.push(x);
i = i + 1;
};
dest
);
The text was updated successfully, but these errors were encountered:
All collections (
CString
,SmartString
,Umbra
,Vector
,List
) should support one of these operations:I see that there is a
[:]
operator. Maybe that could be used for this.This should also be added to the standard library:
The text was updated successfully, but these errors were encountered: