Skip to content

Commit a9c55d8

Browse files
committed
chore: Update website for grain-v0.4.4
1 parent c83fcef commit a9c55d8

File tree

4 files changed

+650
-81
lines changed

4 files changed

+650
-81
lines changed

src/getting_grain.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,30 +22,30 @@ _The `--no-quarantine` flag will avoid having to approve the binary in the Secur
2222

2323
### MacOS x64 - Download
2424

25-
If you'd prefer not to use homebrew, you can [download it](https://github.com/grain-lang/grain/releases/download/grain-v0.4.3/grain-mac-x64) directly from GitHub or using `curl`.
25+
If you'd prefer not to use homebrew, you can [download it](https://github.com/grain-lang/grain/releases/download/grain-v0.4.4/grain-mac-x64) directly from GitHub or using `curl`.
2626

2727
```sh
2828
sudo curl -L --output /usr/local/bin/grain \
29-
https://github.com/grain-lang/grain/releases/download/grain-v0.4.3/grain-mac-x64 \
29+
https://github.com/grain-lang/grain/releases/download/grain-v0.4.4/grain-mac-x64 \
3030
&& sudo chmod +x /usr/local/bin/grain
3131
```
3232

3333
### Linux x64 - Download
3434

35-
You can [download it](https://github.com/grain-lang/grain/releases/download/grain-v0.4.3/grain-linux-x64) directly from GitHub or using `curl`.
35+
You can [download it](https://github.com/grain-lang/grain/releases/download/grain-v0.4.4/grain-linux-x64) directly from GitHub or using `curl`.
3636

3737
```sh
3838
sudo curl -L --output /usr/local/bin/grain \
39-
https://github.com/grain-lang/grain/releases/download/grain-v0.4.3/grain-linux-x64 \
39+
https://github.com/grain-lang/grain/releases/download/grain-v0.4.4/grain-linux-x64 \
4040
&& sudo chmod +x /usr/local/bin/grain
4141
```
4242

4343
### Windows x64 - Download
4444

45-
You can [download it](https://github.com/grain-lang/grain/releases/download/grain-v0.4.3/grain-win-x64.exe) directly from GitHub or using `curl`.
45+
You can [download it](https://github.com/grain-lang/grain/releases/download/grain-v0.4.4/grain-win-x64.exe) directly from GitHub or using `curl`.
4646

4747
```batch
48-
curl -LO https://github.com/grain-lang/grain/releases/download/grain-v0.4.3/grain-win-x64.exe
48+
curl -LO https://github.com/grain-lang/grain/releases/download/grain-v0.4.4/grain-win-x64.exe
4949
```
5050

5151
You'll either want to put it into your path or keep it inside your project and invoke with `.\grain-win-x64.exe`.

src/stdlib/array.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,27 @@ Returns:
263263
|----|-----------|
264264
|`Array<a>`|The new array containing the elements from the input|
265265

266+
### Array.**cycle**
267+
268+
<details disabled>
269+
<summary tabindex="-1">Added in <code>next</code></summary>
270+
No other changes yet.
271+
</details>
272+
273+
```grain
274+
cycle : ((a -> Void), Number, Array<a>) -> Void
275+
```
276+
277+
Iterates an array a given number of times, calling an iterator function on each element.
278+
279+
Parameters:
280+
281+
|param|type|description|
282+
|-----|----|-----------|
283+
|`fn`|`a -> Void`|The iterator function to call with each element|
284+
|`n`|`Number`|The number of times to iterate the given array|
285+
|`array`|`Array<a>`|The array to iterate|
286+
266287
### Array.**forEach**
267288

268289
<details>

src/stdlib/hash.md

Lines changed: 26 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,43 @@
22
title: Hash
33
---
44

5-
Utilities for hashing.
5+
Utilities for hashing any value.
6+
7+
<details disabled>
8+
<summary tabindex="-1">Added in <code>0.1.0</code></summary>
9+
No other changes yet.
10+
</details>
611

712
```grain
813
import Hash from "hash"
914
```
1015

1116
## Values
1217

18+
Functions for hashing.
19+
1320
### Hash.**hash**
1421

22+
<details disabled>
23+
<summary tabindex="-1">Added in <code>0.1.0</code></summary>
24+
No other changes yet.
25+
</details>
26+
1527
```grain
1628
hash : a -> Number
1729
```
1830

19-
Generic hashing.
31+
A generic hash function that produces an integer from any value. If `a == b` then `Hash.hash(a) == Hash.hash(b)`.
32+
33+
Parameters:
34+
35+
|param|type|description|
36+
|-----|----|-----------|
37+
|`anything`|`a`|The value to hash|
38+
39+
Returns:
40+
41+
|type|description|
42+
|----|-----------|
43+
|`Number`|A hash for the given value|
2044

21-
Takes any value and produces an integer. If `a == b` then `Hash.hash(a) == Hash.hash(b)`.

0 commit comments

Comments
 (0)