Current section
Files
Jump to
Current section
Files
atomic_array
README.md
README.md
# 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 <https://hexdocs.pm/atomic_array>.