plum

#treesitter#compiler#wasm

git clone https://git.pyrossh.dev/plum

A statically typed, imperative programming language inspired by rust, python


58b01fcPeter John 2026-08-09T21:11:35+05:30
feat(libs/std): migrate remaining stdlib methods off <Receiver> syntax
libs/std/float.plum CHANGED
@@ -16,24 +16,25 @@ EPSILON = 2.220446049250313e-16f # The difference between 1 and the smallest flo
16
16
  MIN_FLOAT_VALUE = 4.9406564584124654417656879286822137236505980e-324 # Lowest value of float
17
17
  MAX_FLOAT_VALUE = 1.79769313486231570814527423731704356798070e+308 # Highest value of float
18
18
 
19
- # parses a Float from a Str
19
+ type Float =
20
- fun fromStr(s: Str) -> Result =
20
+ fun acosh(self, v: Float) -> Float =
21
- todo
21
+ todo
22
22
 
23
+ # Check whether this number is finite, ie not +/-infinity and not NaN.
23
- fun acosh<Float>(self, v: Float) -> Float =
24
+ fun isFinite(self) -> Bool =
24
- todo
25
+ todo
25
26
 
26
- # Check whether this number is finite, ie not +/-infinity and not NaN.
27
+ # Check whether this number is +/-infinity
27
- fun isFinite<Float>(self) -> Bool =
28
+ fun isInfinite(self) -> Bool =
28
- todo
29
+ todo
29
30
 
30
- # Check whether this number is +/-infinity
31
+ # Check whether this number is NaN.
31
- fun isInfinite<Float>(self) -> Bool =
32
+ fun isNaN(self) -> Bool =
32
- todo
33
+ todo
33
34
 
34
- # Check whether this number is NaN.
35
- fun isNaN<Float>(self) -> Bool =
35
+ fun toStr(self) -> Str =
36
- todo
36
+ todo
37
37
 
38
+ # parses a Float from a Str
38
- fun toStr<Float>(self) -> Str =
39
+ fun fromStr(s: Str) -> Result =
39
40
  todo
libs/std/int.plum CHANGED
@@ -4,46 +4,45 @@ MIN_VALUE = -0x8000_0000_0000_0000 # Lowest value of Int
4
4
  MAX_VALUE = 0x7FFF_FFFF_FFFF_FFFF # Highest value of Int
5
5
  LARGE = 1 << 28 # 2**28
6
6
 
7
- type Int
7
+ type Int =
8
+ # returns the absolute value of the Int
9
+ fun abs(self) -> Int =
10
+ self < 0 ? -self : self
8
11
 
9
- # returns a random Int
10
- fun random() -> Float =
12
+ fun ceil(self) -> Float =
11
- todo
13
+ todo
12
14
 
13
- # parses an Int from a Str
14
- fun fromStr() -> Result =
15
+ fun floor(self) -> Float =
15
- todo
16
+ todo
16
17
 
17
- # returns the absolute value of the Int
18
- fun abs<Int>(self) -> Int =
18
+ fun round(self) -> Float =
19
- self < 0 ? -self : self
19
+ todo
20
20
 
21
- fun ceil<Int>(self) -> Float =
21
+ fun trunc(self) -> Float =
22
- todo
22
+ todo
23
23
 
24
- fun floor<Int>(self) -> Float =
24
+ fun log(self) -> Float =
25
- todo
25
+ todo
26
26
 
27
- fun round<Int>(self) -> Float =
27
+ fun log2(self) -> Float =
28
- todo
28
+ todo
29
29
 
30
- fun trunc<Int>(self) -> Float =
30
+ fun log10(self) -> Float =
31
- todo
31
+ todo
32
32
 
33
- fun log<Int>(self) -> Float =
33
+ fun logb(self) -> Float =
34
- todo
34
+ todo
35
35
 
36
- fun log2<Int>(self) -> Float =
36
+ fun pow(self, y: Float) -> Float =
37
- todo
37
+ todo
38
38
 
39
- fun log10<Int>(self) -> Float =
39
+ fun sqrt(self) -> Float =
40
- todo
40
+ todo
41
-
42
- fun logb<Int>(self) -> Float =
43
- todo
44
41
 
42
+ # returns a random Int
45
- fun pow<Int>(self, y: Float) -> Float =
43
+ fun random() -> Float =
46
44
  todo
47
45
 
46
+ # parses an Int from a Str
48
- fun sqrt<Int>(self) -> Float =
47
+ fun fromStr() -> Result =
49
48
  todo
libs/std/json.plum CHANGED
@@ -31,34 +31,34 @@ type JsonParser =
31
31
  next: Int
32
32
  src: Readable
33
33
 
34
- fun withSrc(src: Readable) -> JsonParser =
34
+ fun parse(self) -> Result =
35
- todo
35
+ todo
36
36
 
37
- fun parse<JsonParser>(self) -> Result =
37
+ fun createErr(self) -> JsonParseError =
38
- todo
38
+ todo
39
39
 
40
- fun createErr<JsonParser>(self) -> JsonParseError =
40
+ fun parseNone(self) -> Result =
41
- todo
41
+ todo
42
42
 
43
- fun parseNone<JsonParser>(self) -> Result =
43
+ fun parseBool(self) -> Result =
44
- todo
44
+ todo
45
45
 
46
- fun parseBool<JsonParser>(self) -> Result =
46
+ fun parseStr(self) -> Result =
47
- todo
47
+ todo
48
48
 
49
- fun parseStr<JsonParser>(self) -> Result =
49
+ fun parseFloat(self) -> Result =
50
- todo
50
+ todo
51
51
 
52
- fun parseFloat<JsonParser>(self) -> Result =
52
+ fun parseInt(self) -> Result =
53
- todo
53
+ todo
54
54
 
55
- fun parseInt<JsonParser>(self) -> Result =
55
+ fun parseList(self) -> Result =
56
- todo
56
+ todo
57
57
 
58
- fun parseList<JsonParser>(self) -> Result =
58
+ fun parseMap(self) -> Result =
59
- todo
59
+ todo
60
60
 
61
- fun parseMap<JsonParser>(self) -> Result =
61
+ fun withSrc(src: Readable) -> JsonParser =
62
62
  todo
63
63
 
64
64
  fun isSpace(c: Int) -> Bool =
libs/std/list.plum CHANGED
@@ -15,169 +15,169 @@ type List[T: Stringable](Stringable) =
15
15
  tail: Option[Node]
16
16
  size: Int
17
17
 
18
- fun makeList(values: ...T) -> List =
19
- List(None, None, 0).add(values)
20
-
21
- # gets the element at i'th index of the list
22
- fun get<List>(self, i: Int) -> Option[T] =
23
- current = self.head
24
- index = 0
25
- while current != None
26
- match current
27
- Some(node) =>
28
- if index == i
29
- return Some(node.value)
30
- current = node.next
31
- index = index + 1
32
- None =>
33
- break
34
- None
35
-
36
- # sets the element at i'th index of the list
37
- fun set<List>(self, i: Int, v: T) -> Option[T] =
38
- todo
39
-
40
- # returns the no of elements in the list
41
- fun length<List>(self) -> Int =
42
- self.size
43
-
44
- # adds the specified elements to the start of the list
45
- fun add<List>(self, values: ...T) =
46
- todo
47
-
48
- # removes the element at i'th index of the list
49
- fun removeAt<List>(self, i: Int) =
50
- todo
51
-
52
- # removes the element v from list
53
- fun remove<List>(self, v: T) =
54
- todo
55
-
56
- # removes all objects from this list
57
- fun clear<List>(self) =
58
- todo
59
-
60
- # returns a new list with the elements in reverse order.
61
- fun reverse<List>(self, v: fn(T) -> Bool) -> List =
62
- todo
63
-
64
- # returns a new list with the elements sorted by sorter
65
- fun sort<List>(self, sorter: fn(T) -> Bool) -> List =
66
- todo
67
-
68
- # returns an item and index in the list if the item is is equal to search item
69
- fun find<List>(self, search: T) -> Option[T] =
70
- todo
71
-
72
- # returns the index of an item in the list if present and comparable otherwise None
73
- fun contains<List>(self, v: T) -> Bool =
74
- todo
75
-
76
- # calls f for each elem in the list
77
- fun each<List>(self, cb: fn(T)) -> Unit =
78
- current = self.head
79
- while current != None
80
- match current
18
+ # gets the element at i'th index of the list
19
+ fun get(self, i: Int) -> Option[T] =
20
+ current = self.head
21
+ index = 0
22
+ while current != None
23
+ match current
24
+ Some(node) =>
25
+ if index == i
26
+ return Some(node.value)
27
+ current = node.next
28
+ index = index + 1
29
+ None =>
30
+ break
31
+ None
32
+
33
+ # sets the element at i'th index of the list
34
+ fun set(self, i: Int, v: T) -> Option[T] =
35
+ todo
36
+
37
+ # returns the no of elements in the list
38
+ fun length(self) -> Int =
39
+ self.size
40
+
41
+ # adds the specified elements to the start of the list
42
+ fun add(self, values: ...T) =
43
+ todo
44
+
45
+ # removes the element at i'th index of the list
46
+ fun removeAt(self, i: Int) =
47
+ todo
48
+
49
+ # removes the element v from list
50
+ fun remove(self, v: T) =
51
+ todo
52
+
53
+ # removes all objects from this list
54
+ fun clear(self) =
55
+ todo
56
+
57
+ # returns a new list with the elements in reverse order.
58
+ fun reverse(self, v: fn(T) -> Bool) -> List =
59
+ todo
60
+
61
+ # returns a new list with the elements sorted by sorter
62
+ fun sort(self, sorter: fn(T) -> Bool) -> List =
63
+ todo
64
+
65
+ # returns an item and index in the list if the item is is equal to search item
66
+ fun find(self, search: T) -> Option[T] =
67
+ todo
68
+
69
+ # returns the index of an item in the list if present and comparable otherwise None
70
+ fun contains(self, v: T) -> Bool =
71
+ todo
72
+
73
+ # calls f for each elem in the list
74
+ fun each(self, cb: fn(T)) -> Unit =
75
+ current = self.head
76
+ while current != None
77
+ match current
78
+ Some(node) =>
79
+ cb(node.value)
80
+ current = node.next
81
+ None =>
82
+ break
83
+
84
+ # returns a list made up of b elements for each elem in the list
85
+ fun map(self, cb: fn(T) -> U) -> List[U] =
86
+ nl = List()
87
+ current = self.head
88
+ while current != None
89
+ match current
90
+ Some(node) =>
91
+ item = cb(node.value)
92
+ nl.add(item)
93
+ current = node.next
94
+ None =>
95
+ break
96
+ nl
97
+
98
+ # returns a new list with each element flat-mapped
99
+ fun flatMap(self) =
100
+ todo
101
+
102
+ # returns a new list with the elements that matched the predicate
103
+ fun retain(self, predicate: fn(T) -> T) -> List =
104
+ todo
105
+
106
+ # returns a new list with the elements that matched the predicate removed
107
+ fun reject(self, predicate: fn(T) -> T) -> List =
108
+ todo
109
+
110
+ # returns true if any element in the list satisfies the predicate
111
+ fun any(self, predicate: fn(T) -> Bool) -> Bool =
112
+ todo
113
+
114
+ # returns true if all of the elements in the list satisfies the predicate
115
+ fun every(self, predicate: fn(T) -> Bool) -> Bool =
116
+ todo
117
+
118
+ # returns the accumulated value of all the elements in the list
119
+ fun reduce(self, acc: U, cb: fn(T) -> T) -> Option[U] =
120
+ todo
121
+
122
+ # returns the first element in the list
123
+ fun first(self) -> Option[T] =
124
+ match self.head
81
125
  Some(node) =>
82
- cb(node.value)
126
+ Some(node.value)
83
- current = node.next
84
127
  None =>
85
- break
128
+ None
86
-
129
+
87
- # returns a list made up of b elements for each elem in the list
130
+ # returns the last element in the list
88
- fun map<List>(self, cb: fn(T) -> U) -> List[U] =
131
+ fun last(self) -> Option[T] =
89
- nl = List()
90
- current = self.head
91
- while current != None
92
- match current
132
+ match self.tail
93
133
  Some(node) =>
94
- item = cb(node.value)
134
+ Some(node.value)
95
- nl.add(item)
96
- current = node.next
97
135
  None =>
98
- break
99
- nl
100
-
101
- # returns a new list with each element flat-mapped
102
- fun flatMap<List>(self) =
103
- todo
104
-
105
- # returns a new list with the elements that matched the predicate
106
- fun retain<List>(self, predicate: fn(T) -> T) -> List =
107
- todo
108
-
109
- # returns a new list with the elements that matched the predicate removed
110
- fun reject<List>(self, predicate: fn(T) -> T) -> List =
111
- todo
112
-
113
- # returns true if any element in the list satisfies the predicate
114
- fun any<List>(self, predicate: fn(T) -> Bool) -> Bool =
115
- todo
116
-
117
- # returns true if all of the elements in the list satisfies the predicate
118
- fun every<List>(self, predicate: fn(T) -> Bool) -> Bool =
119
- todo
120
-
121
- # returns the accumulated value of all the elements in the list
122
- fun reduce<List>(self, acc: U, cb: fn(T) -> T) -> Option[U] =
123
- todo
124
-
125
- # returns the first element in the list
126
- fun first<List>(self) -> Option[T] =
127
- match self.head
128
- Some(node) =>
129
- Some(node.value)
130
- None =>
131
- None
132
-
133
- # returns the last element in the list
134
- fun last<List>(self) -> Option[T] =
135
- match self.tail
136
- Some(node) =>
137
- Some(node.value)
138
- None =>
139
- None
140
-
141
- # returns a list containing the first n elements of the given list
142
- fun sublist<List>(self, start: Int, end: Int) -> List =
143
- todo
144
-
145
- # returns a list containing the first n elements of the given list
146
- fun take<List>(self, n: Int) -> List =
147
- todo
148
-
149
- # returns a list containing the first n elements of the given list
150
- fun skip<List>(self, n: Int) -> List =
151
- todo
152
-
153
- # returns a list containing the first n elements of the given list
154
- fun drop<List>(self, n: Int) -> List =
155
- todo
156
-
157
- # returns a new list with some of the elements taken randomly
158
- fun sample<List>(self) =
159
- todo
160
-
161
- # returns a new list with all elements shuffled
162
- fun shuffle<List>(self) =
163
- todo
164
-
165
- # returns a new list with all elements grouped by adjacent pairs
166
- fun partition<List>(self) =
167
- todo
168
-
169
- # returns a new list with all elements grouped into chunks
170
- fun chunk<List>(self) =
171
- todo
172
-
173
- # returns a new list with all elements grouped
174
- fun groupBy<List>(self) =
175
- todo
176
-
177
- fun join<List>(self, sep: Str = ",") -> Str =
178
- res = Buffer()
179
- self.each(|v|
180
- res.write(v.toStr())
181
- res.write(sep)
182
- )
183
- res.toStr()
136
+ None
137
+
138
+ # returns a list containing the first n elements of the given list
139
+ fun sublist(self, start: Int, end: Int) -> List =
140
+ todo
141
+
142
+ # returns a list containing the first n elements of the given list
143
+ fun take(self, n: Int) -> List =
144
+ todo
145
+
146
+ # returns a list containing the first n elements of the given list
147
+ fun skip(self, n: Int) -> List =
148
+ todo
149
+
150
+ # returns a list containing the first n elements of the given list
151
+ fun drop(self, n: Int) -> List =
152
+ todo
153
+
154
+ # returns a new list with some of the elements taken randomly
155
+ fun sample(self) =
156
+ todo
157
+
158
+ # returns a new list with all elements shuffled
159
+ fun shuffle(self) =
160
+ todo
161
+
162
+ # returns a new list with all elements grouped by adjacent pairs
163
+ fun partition(self) =
164
+ todo
165
+
166
+ # returns a new list with all elements grouped into chunks
167
+ fun chunk(self) =
168
+ todo
169
+
170
+ # returns a new list with all elements grouped
171
+ fun groupBy(self) =
172
+ todo
173
+
174
+ fun join(self, sep: Str = ",") -> Str =
175
+ res = Buffer()
176
+ self.each(|v|
177
+ res.write(v.toStr())
178
+ res.write(sep)
179
+ )
180
+ res.toStr()
181
+
182
+ fun makeList(values: ...T) -> List =
183
+ List(None, None, 0).add(values)
libs/std/map.plum CHANGED
@@ -10,27 +10,27 @@ type Pair[K, V] =
10
10
  type Map[K, V] =
11
11
  items: List[Pair[K, V]]
12
12
 
13
- fun init<Map>(self, kvs: ...Pair) -> Map =
13
+ fun init(self, kvs: ...Pair) -> Map =
14
- Map().add(kvs)
14
+ Map().add(kvs)
15
-
15
+
16
- # adds the specified elements to the start of the list
16
+ # adds the specified elements to the start of the list
17
- fun add<Map>(self, kvs: ...Pair) =
17
+ fun add(self, kvs: ...Pair) =
18
- self.items.add(kvs)
18
+ self.items.add(kvs)
19
-
19
+
20
- # gets a value from the Map using key k
20
+ # gets a value from the Map using key k
21
- fun get<Map>(self, k: K) -> Option[V] =
21
+ fun get(self, k: K) -> Option[V] =
22
- for p in self.items
22
+ for p in self.items
23
- if p.key == k
23
+ if p.key == k
24
- return Some(p.val)
24
+ return Some(p.val)
25
- None
25
+ None
26
-
26
+
27
- # puts a value into the Map
27
+ # puts a value into the Map
28
- fun set<Map>(self, k: K, v: V) =
28
+ fun set(self, k: K, v: V) =
29
- self.items.add(Pair(key: k, val: v))
29
+ self.items.add(Pair(key: k, val: v))
30
-
30
+
31
- # puts a value into the Map if its not already present
31
+ # puts a value into the Map if its not already present
32
- fun putIfAbsent<Map>(self, k: K, v: V) =
32
+ fun putIfAbsent(self, k: K, v: V) =
33
- todo
33
+ todo
34
-
34
+
35
- fun map<Map>(self, cb: fn(Pair[K, V]) -> Pair[X, Y]) -> Map[X, Y] =
35
+ fun map(self, cb: fn(Pair[K, V]) -> Pair[X, Y]) -> Map[X, Y] =
36
- self.items.map(cb)
36
+ self.items.map(cb)
libs/std/result.plum CHANGED
@@ -4,7 +4,7 @@ enum Result =
4
4
  | Ok[T]
5
5
  | Err[E]
6
6
 
7
- fun isOk<Result>(self) -> Bool =
7
+ fun isOk(self) -> Bool =
8
8
  'checks whether the result is an Ok value'
9
9
  match self
10
10
  Ok(_) =>
libs/std/str.plum CHANGED
@@ -10,123 +10,123 @@ trait Stringable =
10
10
  type Str(Comparable, Stringable, Readable, Writable) =
11
11
  data: Buffer
12
12
 
13
- fun get<Str>(self, i: Int) -> Char =
13
+ fun get(self, i: Int) -> Char =
14
- todo
14
+ todo
15
15
 
16
- fun contains<Str>(self, search: Str) -> Bool =
16
+ fun contains(self, search: Str) -> Bool =
17
- todo
17
+ todo
18
18
 
19
- fun indexOf<Str>(self, sub: Str) -> Int =
19
+ fun indexOf(self, sub: Str) -> Int =
20
- todo
20
+ todo
21
21
 
22
- fun test<Str>(self, pattern: Regex) -> Bool =
22
+ fun test(self, pattern: Regex) -> Bool =
23
- todo
23
+ todo
24
24
 
25
- fun startsWith<Str>(self, search: Str) -> Bool =
25
+ fun startsWith(self, search: Str) -> Bool =
26
- todo
26
+ todo
27
27
 
28
- fun concat<Str>(self, other: Str) -> Str =
28
+ fun concat(self, other: Str) -> Str =
29
- self + other
29
+ self + other
30
30
 
31
- fun toStr<Str>(self) -> Str =
31
+ fun toStr(self) -> Str =
32
- self
32
+ self
33
33
 
34
- fun matchPattern<Str>(self, pattern: Regex) -> List =
34
+ fun matchPattern(self, pattern: Regex) -> List =
35
- todo
35
+ todo
36
36
 
37
- fun matchAll<Str>(self, pattern: Regex) -> List =
37
+ fun matchAll(self, pattern: Regex) -> List =
38
- todo
38
+ todo
39
39
 
40
- fun padStart<Str>(self, sub: Str, count: Int) -> Str =
40
+ fun padStart(self, sub: Str, count: Int) -> Str =
41
- todo
41
+ todo
42
42
 
43
- fun padEnd<Str>(self, sub: Str, count: Int) -> Str =
43
+ fun padEnd(self, sub: Str, count: Int) -> Str =
44
- todo
44
+ todo
45
45
 
46
- fun repeat<Str>(self, count: Int) -> Str =
46
+ fun repeat(self, count: Int) -> Str =
47
- todo
47
+ todo
48
48
 
49
- fun replace<Str>(self, pattern: Regex, sub: Str) -> Str =
49
+ fun replace(self, pattern: Regex, sub: Str) -> Str =
50
- todo
50
+ todo
51
51
 
52
- fun replaceAll<Str>(self, pattern: Regex, sub: Str) -> Str =
52
+ fun replaceAll(self, pattern: Regex, sub: Str) -> Str =
53
- todo
53
+ todo
54
54
 
55
- fun search<Str>(self, pattern: Regex) -> Str =
55
+ fun search(self, pattern: Regex) -> Str =
56
- todo
56
+ todo
57
57
 
58
- fun slice<Str>(self, start: Int, e: Int) -> Str =
58
+ fun slice(self, start: Int, e: Int) -> Str =
59
- todo
59
+ todo
60
60
 
61
- fun split<Str>(self, separator: Str, limit: Int) -> List =
61
+ fun split(self, separator: Str, limit: Int) -> List =
62
- todo
62
+ todo
63
63
 
64
- fun sub<Str>(self, start: Int, e: Int) -> Str =
64
+ fun sub(self, start: Int, e: Int) -> Str =
65
- todo
65
+ todo
66
66
 
67
- fun toLower<Str>(self) -> Str =
67
+ fun toLower(self) -> Str =
68
- todo
68
+ todo
69
69
 
70
- # reverses a Str
70
+ # reverses a Str
71
- fun reverse<Str>(self) -> Str =
71
+ fun reverse(self) -> Str =
72
- todo
72
+ todo
73
73
 
74
- fun camelCase<Str>(self) -> Str =
74
+ fun camelCase(self) -> Str =
75
- todo
75
+ todo
76
76
 
77
- fun snakeCase<Str>(self) -> Str =
77
+ fun snakeCase(self) -> Str =
78
- todo
78
+ todo
79
79
 
80
- fun capitalize<Str>(self) -> Str =
80
+ fun capitalize(self) -> Str =
81
- todo
81
+ todo
82
82
 
83
- fun kebabCase<Str>(self) -> Str =
83
+ fun kebabCase(self) -> Str =
84
- todo
84
+ todo
85
85
 
86
- fun lowerCase<Str>(self) -> Str =
86
+ fun lowerCase(self) -> Str =
87
- todo
87
+ todo
88
88
 
89
- fun lowerFirst<Str>(self) -> Str =
89
+ fun lowerFirst(self) -> Str =
90
- todo
90
+ todo
91
91
 
92
- fun upperCase<Str>(self) -> Str =
92
+ fun upperCase(self) -> Str =
93
- todo
93
+ todo
94
94
 
95
- fun upperFirst<Str>(self) -> Str =
95
+ fun upperFirst(self) -> Str =
96
- todo
96
+ todo
97
97
 
98
- fun startCase<Str>(self) -> Str =
98
+ fun startCase(self) -> Str =
99
- todo
99
+ todo
100
100
 
101
- fun deburr<Str>(self) -> Str =
101
+ fun deburr(self) -> Str =
102
- todo
102
+ todo
103
103
 
104
- fun escape<Str>(self) -> Str =
104
+ fun escape(self) -> Str =
105
- todo
105
+ todo
106
106
 
107
- fun escapeRegExp<Str>(self) -> Str =
107
+ fun escapeRegExp(self) -> Str =
108
- todo
108
+ todo
109
109
 
110
- fun pad<Str>(self) -> Str =
110
+ fun pad(self) -> Str =
111
- todo
111
+ todo
112
112
 
113
- fun template<Str>(self) -> Str =
113
+ fun template(self) -> Str =
114
- todo
114
+ todo
115
115
 
116
- fun trim<Str>(self) -> Str =
116
+ fun trim(self) -> Str =
117
- todo
117
+ todo
118
118
 
119
- fun trimEnd<Str>(self) -> Str =
119
+ fun trimEnd(self) -> Str =
120
- todo
120
+ todo
121
121
 
122
- fun trimStart<Str>(self) -> Str =
122
+ fun trimStart(self) -> Str =
123
- todo
123
+ todo
124
124
 
125
- fun truncate<Str>(self) -> Str =
125
+ fun truncate(self) -> Str =
126
- todo
126
+ todo
127
127
 
128
- fun unescape<Str>(self) -> Str =
128
+ fun unescape(self) -> Str =
129
- todo
129
+ todo
130
130
 
131
- fun words<Str>(self) -> Str =
131
+ fun words(self) -> Str =
132
- todo
132
+ todo