-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstring.eiv
More file actions
45 lines (34 loc) · 709 Bytes
/
Copy pathstring.eiv
File metadata and controls
45 lines (34 loc) · 709 Bytes
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
string = {
_type_ = "string"
constructor = (in){
this.vec = []
this.vec += in
}
_add_ = (to_add){
return string(this.vec + to_add)
}
_display_ = (){
for i = 0; i < this.length(); i += 1{
print(this.vec[i])
}
}
_eq_ = (in){
type_of_in = typeof(in)
if type_of_in == "array"{
return in == this.vec
}
if type_of_in == "string"{
return in.vec == this.vec
}
return false
}
push = (in){
this.vec += in
}
length = (){
return this.vec.length
}
at = (i) {
return this.vec[i]
}
}