# Diced
Simple algebraic dice notation parser for Gleam
[](https://hex.pm/packages/diced)
[](https://hexdocs.pm/diced/)
```sh
gleam add diced
```
```gleam
import diced
pub fn main() {
echo diced.parse("1d6")
// Ok(diced.Basic(1, 6, []))
echo diced.parse("5d20kh2kl2")
// Ok(diced.Basic(2, 20, [diced.KeepHighest(2), diced.KeepLowest(2)]))
echo diced.parse("1")
// Ok(diced.Number(1, []))
echo diced.parse("4dF")
// Ok(diced.Fate(4, []))
}
```
Further documentation can be found at <https://hexdocs.pm/diced>.
## Development
```sh
gleam run # Run the project
gleam test # Run the tests
```