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
{{ message }}
This repository has been archived by the owner on Aug 1, 2023. It is now read-only.
All of these can be written in Quark (e.g., in the ListUtil<T> class), but that might not be the most efficient way to do so.
List<T>
// Queries
int indexOf(T value) -> lowest index of value in self, or -1 if not found
bool contains(T value) -> indexOf(value) != -1
int count(T value) -> 0..n number of times value is found in self
// Ways to make new lists
List<T> __add__(List<T> other) - concatenate
List<T> __mul__(int count) - repeat
List<T> copy() -> self * 1 - returns a new list that is a shallow copy of self
// Ways to mutate self
void extend(List<T> additional) - mutates self to be self + additional
void reverse() - reverse
The text was updated successfully, but these errors were encountered:
All of these can be written in Quark (e.g., in the
ListUtil<T>
class), but that might not be the most efficient way to do so.The text was updated successfully, but these errors were encountered: