-
Notifications
You must be signed in to change notification settings - Fork 115
/
Copy patharray.mbti
111 lines (94 loc) · 3.61 KB
/
array.mbti
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
package "moonbitlang/core/array"
import(
"moonbitlang/core/bytes"
"moonbitlang/core/quickcheck"
)
// Values
fn copy[T](Array[T]) -> Array[T]
fn filter_map[A, B](Array[A], (A) -> B?) -> Array[B]
fn join(Array[String], String) -> String
fn last[A](Array[A]) -> A?
fn push_iter[T](Array[T], Iter[T]) -> Unit
fn shuffle[T](Array[T], rand~ : (Int) -> Int) -> Array[T]
fn shuffle_in_place[T](Array[T], rand~ : (Int) -> Int) -> Unit
fn sort[T : Compare](Array[T]) -> Unit
fn sort_by[T](Array[T], (T, T) -> Int) -> Unit
fn sort_by_key[T, K : Compare](Array[T], (T) -> K) -> Unit
// Types and methods
impl FixedArray {
all[T](Self[T], (T) -> Bool) -> Bool
any[T](Self[T], (T) -> Bool) -> Bool
blit_from_bytesview(Self[Byte], Int, @bytes.View) -> Unit
contains[T : Eq](Self[T], T) -> Bool
copy[T](Self[T]) -> Self[T]
each[T](Self[T], (T) -> Unit) -> Unit
eachi[T](Self[T], (Int, T) -> Unit) -> Unit
ends_with[T : Eq](Self[T], Self[T]) -> Bool
fold[A, B](Self[A], init~ : B, (B, A) -> B) -> B
foldi[A, B](Self[A], init~ : B, (Int, B, A) -> B) -> B
from_array[T](Array[T]) -> Self[T]
from_iter[T](Iter[T]) -> Self[T]
is_sorted[T : Compare](Self[T]) -> Bool
last[A](Self[A]) -> A?
makei[T](Int, (Int) -> T) -> Self[T]
map[T, U](Self[T], (T) -> U) -> Self[U]
mapi[T, U](Self[T], (Int, T) -> U) -> Self[U]
rev[T](Self[T]) -> Self[T]
rev_each[T](Self[T], (T) -> Unit) -> Unit
rev_eachi[T](Self[T], (Int, T) -> Unit) -> Unit
rev_fold[A, B](Self[A], init~ : B, (B, A) -> B) -> B
rev_foldi[A, B](Self[A], init~ : B, (Int, B, A) -> B) -> B
rev_inplace[T](Self[T]) -> Unit
search[T : Eq](Self[T], T) -> Int?
sort[T : Compare](Self[T]) -> Unit
sort_by[T](Self[T], (T, T) -> Int) -> Unit
sort_by_key[T, K : Compare](Self[T], (T) -> K) -> Unit
stable_sort[T : Compare](Self[T]) -> Unit
starts_with[T : Eq](Self[T], Self[T]) -> Bool
swap[T](Self[T], Int, Int) -> Unit
}
impl[T] Add for FixedArray[T]
impl[T : Compare] Compare for FixedArray[T]
impl[T : Eq] Eq for FixedArray[T]
impl[T : Hash] Hash for FixedArray[T]
impl[X : @quickcheck.Arbitrary] @quickcheck.Arbitrary for FixedArray[X]
impl Array {
copy[T](Self[T]) -> Self[T]
filter_map[A, B](Self[A], (A) -> B?) -> Self[B]
from_iter[T](Iter[T]) -> Self[T]
join(Self[String], String) -> String
last[A](Self[A]) -> A?
makei[T](Int, (Int) -> T) -> Self[T]
push_iter[T](Self[T], Iter[T]) -> Unit
shuffle[T](Self[T], rand~ : (Int) -> Int) -> Self[T]
shuffle_in_place[T](Self[T], rand~ : (Int) -> Int) -> Unit
sort[T : Compare](Self[T]) -> Unit
sort_by[T](Self[T], (T, T) -> Int) -> Unit
sort_by_key[T, K : Compare](Self[T], (T) -> K) -> Unit
}
impl[X : @quickcheck.Arbitrary] @quickcheck.Arbitrary for Array[X]
impl ArrayView {
all[T](Self[T], (T) -> Bool) -> Bool
any[T](Self[T], (T) -> Bool) -> Bool
contains[T : Eq](Self[T], T) -> Bool
each[T](Self[T], (T) -> Unit) -> Unit
eachi[T](Self[T], (Int, T) -> Unit) -> Unit
filter[T](Self[T], (T) -> Bool) -> Array[T]
fold[A, B](Self[A], init~ : B, (B, A) -> B) -> B
foldi[A, B](Self[A], init~ : B, (Int, B, A) -> B) -> B
iter[A](Self[A]) -> Iter[A]
map[T, U](Self[T], (T) -> U) -> Array[U]
map_inplace[T](Self[T], (T) -> T) -> Unit
mapi[T, U](Self[T], (Int, T) -> U) -> Array[U]
mapi_inplace[T](Self[T], (Int, T) -> T) -> Unit
rev_fold[A, B](Self[A], init~ : B, (B, A) -> B) -> B
rev_foldi[A, B](Self[A], init~ : B, (Int, B, A) -> B) -> B
rev_inplace[T](Self[T]) -> Unit
to_array[T](Self[T]) -> Array[T]
}
impl[T : Compare] Compare for ArrayView[T]
impl[T : Eq] Eq for ArrayView[T]
impl[X : Show] Show for ArrayView[X]
// Type aliases
pub typealias View[T] = ArrayView[T]
// Traits