diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2025-04-07 15:35:13 -0400 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2025-04-07 15:35:13 -0400 |
| commit | 0d2060717a21653deb3db03ba5b3fe62aa4c098e (patch) | |
| tree | 9c0636930d5a358d8e654690cec69d7d3d7c19a4 /docs | |
| parent | d2bee9ce7401672cae5cf02cf15dfa0ee48c2352 (diff) | |
Remove table.bump()
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/tables.md | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/docs/tables.md b/docs/tables.md index c0376f38..ee2603f5 100644 --- a/docs/tables.md +++ b/docs/tables.md @@ -152,37 +152,12 @@ iterating over any of the new values. ## Table Methods -- [`func bump(t:&{K=V}, key: K, amount: Int = 1 -> Void)`](#bump) - [`func clear(t:&{K=V})`](#clear) - [`func get(t:{K=V}, key: K -> V?)`](#get) - [`func has(t:{K=V}, key: K -> Bool)`](#has) - [`func remove(t:{K=V}, key: K -> Void)`](#remove) - [`func set(t:{K=V}, key: K, value: V -> Void)`](#set) -### `bump` -Increments the value associated with a key by a specified amount. If the key is -not already in the table, its value will be assumed to be zero. - -```tomo -func bump(t:&{K=V}, key: K, amount: Int = 1 -> Void) -``` - -- `t`: The reference to the table. -- `key`: The key whose value is to be incremented. -- `amount`: The amount to increment the value by (default: 1). - -**Returns:** -Nothing. - -**Example:** -```tomo ->> t := {"A"=1} -t.bump("A") -t.bump("B", 10) ->> t -= {"A"=2, "B"=10} -``` - --- ### `clear` |
