README.md
# ref
[](https://hex.pm/packages/ref)
[](https://hexdocs.pm/ref/)
```sh
gleam add ref
```
```gleam
import ref
pub fn main() {
let myref = ref.cell(0)
io.debug(ref.get(myref))
// -> 0
ref.set(myref, fn(a) { a + 1 })
ref.set(myref, fn(a) { a + 1 })
ref.set(myref, fn(a) { a + 1 })
io.debug(ref.get(myref))
// -> 3
}
```
Further documentation can be found at <https://hexdocs.pm/ref>.
## Development
```sh
gleam run # Run the project
gleam test # Run the tests
gleam shell # Run an Erlang shell
```