As for scalars, collections API semantics aligns to C# conventions.
Strings
module Standard;
string operator + (string x, string y);
char operator [] (string x, int y);
bool operator in (char x, string y)
bool operator == (string x, string y);
bool operator != (string x, string y);
bool operator <= (string x, string y);
bool operator < (string x, string y);
bool operator >= (string x, string y);
bool operator > (string x, string y);
int IndexOf(this string x, string y);
int IndexOf(this string x, string y, int start);
int LastIndexOf(this string x, string y);
int LastIndexOf(this string x, string y, int start);
string Segment(this string x, int start);
string Segment(this string x, int start, int count);
string Replace(this string x, string phrase, string replacement);
int get Count(this string x);
string operator as (array a);
string operator as (char c);
string ToUpper(this string s);
string ToLower(this string s);
string Trim(this string s);
int GetIterator(this string x);
char GetCurrent(this string x, int s);
bool MoveNext(this string x, ref int s);
Binary
module Standard;
binary operator + (binary x, binary y);
byte operator [] (binary x, int y);
bool operator in (byte x, binary y);
bool operator == (binary x, binary y);
bool operator != (binary x, binary y);
bool operator <= (binary x, binary y);
bool operator < (binary x, binary y);
bool operator >= (binary x, binary y);
bool operator > (binary x, binary y);
int IndexOf(this binary x, binary y);
int IndexOf(this binary x, binary y, int start);
int LastIndexOf(this binary x, binary y);
int LastIndexOf(this binary x, binary y, int start);
binary Segment(this binary x, int start);
binary Segment(this binary x, int start, int count);
int get Count(this binary x);
binary operator as (array x);
binary operator as (string s);
int GetIterator(this binary x);
byte GetCurrent(this binary x, int s);
bool MoveNext(this binary x, ref int s);
Arrays
module Standard;
array operator + (array x, array y);
T operator [] (array x, int y);
bool operator in (T x, array y);
bool operator == (array x, array y);
bool operator != (array x, array y);
int IndexOf(this array x, array y);
int IndexOf(this array x, array y, int start);
int LastIndexOf(this array x, array y);
int LastIndexOf(this array x, array y, int start);
array Segment(this array x, int start);
array Segment(this array x, int start, int count);
int get Count(this array x);
array operator as (string s);
array operator as (binary b);
array Select(this array x, R(T) f);
R Accumulate(this array x, R(T,R) f);
array Filter(this array x, bool(T) f);
void Do(this array x, void(T) f);
// Returns if all elements in an array are different.
bool distinct(this array x);
// Returns the intersection of two arrays.
array intersection(this array x, array y);
// Returns the difference of two arrays.
array except(this array x, array y);
// Applies an accumulator function over a sequence. The specified seed value
// is used as the initial accumulator value, similar to "fold" function in
// functional languages.
Q aggregate(this array x, Q seed, (Q, array) => Q func);
// Returns the sum of all the elements of an array.
AnyNumber sum(this array x);
// Returns the minimum of the array, or nothing if the array is empty.
optional IComparable min(this array x);
// Returns the maximum of the array, or nothing if the array is empty.
optional IComparable max(this array x);
// Returns the average of the array, or nothing if the array is empty.
optional float average(this array x);
// Returns an array where each element is the absolute value of the
// corresponding element in the original array.
array abs(this array x);
int GetIterator(this array x);
T GetCurrent(this array x, int s);
bool MoveNext(this array x, ref int s);
Maps
module Standard;
map operator + (map x, map y);
D operator [] (map x, K y);
bool operator in (K x, map y);
bool operator == (map x, map y);
bool operator != (map x, map y);
int get Count(this map x);
set get Keys(this map x);
array get Values(this map x);
map Remove(this map x, K y);
map Select(this map x, R(K,D) f);
R Accumulate(this map x, R(K,D,R) f);
map Filter(this map x, bool(K,D) f);
void Do(this map x, void(K,D) f);
int GetIterator(this map x);
Pair GetCurrent(this map x, int s);
bool MoveNext(this map x, ref int s);
type Pair;
K get Key(this Pair x);
D get Value(this Pair x);
Sets
module Standard;
set operator + (set x, set y);
set operator + (set x, T y);
bool operator in (T x, set y);
bool operator [] (set x, T y);
bool operator == (set x, set y);
bool operator != (set x, set y);
int get Count(this set x);
set Select(this set x, R(T) f);
R Accumulate(this set x, R(T,R) f);
set Filter(this set x, bool(T) f);
void Do(this set x, void(T) f);
int GetIterator(this set x);
T GetCurrent(this set x, int s);
bool MoveNext(this set x, ref int s);
Share with your friends: |