Skip to content

Commit

Permalink
chore: Add version history back to hash
Browse files Browse the repository at this point in the history
  • Loading branch information
spotandjake committed Oct 4, 2024
1 parent 458138d commit 33c4306
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
3 changes: 3 additions & 0 deletions stdlib/hash.gr
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,9 @@ provide let makeSeeded = seed => {
* @example
* let hashInstance = Hash.makeSeeded(1)
* assert Hash.hash(hashInstance," Hello World") == Hash.hash(hashInstance, "Hello World)
*
* @since v0.1.0
* @history v0.7.0: Added `hashInstance` parameter instead of using a global seed
*/
@unsafe
provide let hash = (hashInstance, anything) => {
Expand Down
12 changes: 12 additions & 0 deletions stdlib/hash.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,18 @@ assert Hash.hash(hashInstance1," Hello World") != Hash.hash(hashInstance2, "Hell

### Hash.**hash**

<details>
<summary>Added in <code>0.1.0</code></summary>
<table>
<thead>
<tr><th>version</th><th>changes</th></tr>
</thead>
<tbody>
<tr><td><code>next</code></td><td>Added `hashInstance` parameter instead of using a global seed</td></tr>
</tbody>
</table>
</details>

```grain
hash : (hashInstance: HashInstance, anything: a) => Number
```
Expand Down

0 comments on commit 33c4306

Please sign in to comment.