@@ -47,7 +47,7 @@ Parent is [@aureooms/js-persistent](https://github.com/aureooms/js-persistent).
47
47
* [ ` Tree#last() -> x ` ] ( #treelast---x )
48
48
* [ ` Tree#init() -> Tree ` ] ( #treeinit---tree )
49
49
* [ ` Tree#tail() -> Tree ` ] ( #treetail---tree )
50
- * [ :salt : Add elements ] ( #salt-add-elements )
50
+ * [ :salt : Add values ] ( #salt-add-values )
51
51
* [ ` Tree#push(x) -> Tree ` ] ( #treepushx---tree )
52
52
* [ ` Tree#cons(x) -> Tree ` ] ( #treeconsx---tree )
53
53
* [ ` Tree#append(Iterable) -> Tree ` ] ( #treeappenditerable---tree )
@@ -185,21 +185,21 @@ let last = tree.last() ; // 'b'
185
185
186
186
#### ` Tree#init() -> Tree `
187
187
188
- Returns a new tree without the right-most element .
188
+ Returns a new tree without the right-most value .
189
189
190
190
``` js
191
191
while ( ! tree .empty () ) tree = tree .init () ;
192
192
```
193
193
194
194
#### ` Tree#tail() -> Tree `
195
195
196
- Returns a new tree without the left-most element .
196
+ Returns a new tree without the left-most value .
197
197
198
198
``` js
199
199
while ( ! tree .empty () ) tree = tree .tail () ;
200
200
```
201
201
202
- ### :salt : Add elements
202
+ ### :salt : Add values
203
203
204
204
#### ` Tree#push(x) -> Tree `
205
205
@@ -246,15 +246,15 @@ tree = tree.concat( tree );
246
246
247
247
### :broken_heart : Split
248
248
249
- The following methods allow you to efficiently split a tree at the element
249
+ The following methods allow you to efficiently split a tree at the value
250
250
where the measure crosses a given threshold.
251
251
252
252
#### ` Tree#splitTree(Function, m) -> [ Tree , x , Tree ] `
253
253
254
254
Split the tree into a left tree, a middle value, and a right tree according to
255
255
a predicate on the measure of the tree __ increased by a constant measure ` m ` __ .
256
256
The predicate must be monotone, false then true, on prefixes of the values in
257
- left-to-right order. The middle value ` x ` is the element for which the predicate
257
+ left-to-right order. The middle value ` x ` is the value for which the predicate
258
258
switches from false to true.
259
259
260
260
``` js
@@ -266,7 +266,7 @@ let [ left , right ] = tree.split( measure => measure > 1 , 1 ) ;
266
266
Split the tree into a left tree and a right tree according to a predicate on
267
267
the measure of the tree. The predicate must be monotone, false then true, on
268
268
prefixes of the values in left-to-right order. The left-most value of the right
269
- tree is the element for which the predicate switches from false to true.
269
+ tree is the value for which the predicate switches from false to true.
270
270
271
271
``` js
272
272
let [ left , right ] = tree .split ( measure => measure > 2 ) ;
0 commit comments