https://github.com/lpil/atomic-array
Atomic mutable int arrays for Gleam!
https://github.com/lpil/atomic-array
Last synced: 3 months ago
JSON representation
Atomic mutable int arrays for Gleam!
- Host: GitHub
- URL: https://github.com/lpil/atomic-array
- Owner: lpil
- Created: 2024-07-25T17:14:30.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-07-25T17:17:12.000Z (almost 2 years ago)
- Last Synced: 2025-09-26T07:52:18.767Z (8 months ago)
- Language: Gleam
- Size: 5.86 KB
- Stars: 6
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# atomic_array
Atomic mutable int arrays for Gleam!
[](https://hex.pm/packages/atomic_array)
[](https://hexdocs.pm/atomic_array/)
```sh
gleam add atomic_array@1
```
```gleam
import atomic_array
pub fn main() {
let array = atomic_array.new_signed(size: 30)
// Mutate the array
let assert Ok(_) = atomic_array.add(array, 0, 5)
let assert Ok(_) = atomic_array.add(array, 0, 5)
// The array is mutated
array
|> atomic_array.get(0)
|> should.equal(Ok(10))
}
```
Further documentation can be found at .