Skip to content

Commit 2d784d6

Browse files
📚 docs(README): element -> value
1 parent 2effabb commit 2d784d6

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ Parent is [@aureooms/js-persistent](https://github.com/aureooms/js-persistent).
4747
* [`Tree#last() -> x`](#treelast---x)
4848
* [`Tree#init() -> Tree`](#treeinit---tree)
4949
* [`Tree#tail() -> Tree`](#treetail---tree)
50-
* [:salt: Add elements](#salt-add-elements)
50+
* [:salt: Add values](#salt-add-values)
5151
* [`Tree#push(x) -> Tree`](#treepushx---tree)
5252
* [`Tree#cons(x) -> Tree`](#treeconsx---tree)
5353
* [`Tree#append(Iterable) -> Tree`](#treeappenditerable---tree)
@@ -185,21 +185,21 @@ let last = tree.last() ; // 'b'
185185

186186
#### `Tree#init() -> Tree`
187187

188-
Returns a new tree without the right-most element.
188+
Returns a new tree without the right-most value.
189189

190190
```js
191191
while ( ! tree.empty() ) tree = tree.init() ;
192192
```
193193

194194
#### `Tree#tail() -> Tree`
195195

196-
Returns a new tree without the left-most element.
196+
Returns a new tree without the left-most value.
197197

198198
```js
199199
while ( ! tree.empty() ) tree = tree.tail() ;
200200
```
201201

202-
### :salt: Add elements
202+
### :salt: Add values
203203

204204
#### `Tree#push(x) -> Tree`
205205

@@ -246,15 +246,15 @@ tree = tree.concat( tree );
246246

247247
### :broken_heart: Split
248248

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
250250
where the measure crosses a given threshold.
251251

252252
#### `Tree#splitTree(Function, m) -> [ Tree , x , Tree ]`
253253

254254
Split the tree into a left tree, a middle value, and a right tree according to
255255
a predicate on the measure of the tree __increased by a constant measure `m`__.
256256
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
258258
switches from false to true.
259259

260260
```js
@@ -266,7 +266,7 @@ let [ left , right ] = tree.split( measure => measure > 1 , 1 ) ;
266266
Split the tree into a left tree and a right tree according to a predicate on
267267
the measure of the tree. The predicate must be monotone, false then true, on
268268
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.
270270

271271
```js
272272
let [ left , right ] = tree.split( measure => measure > 2 ) ;

0 commit comments

Comments
 (0)