README.md

# gleaph

[![Package Version](https://img.shields.io/hexpm/v/gleaph)](https://hex.pm/packages/gleaph)
[![Hex Docs](https://img.shields.io/badge/hex-docs-ffaff3)](https://hexdocs.pm/gleaph/)

A graph library written in pure Gleam!

```sh
gleam add gleaph@1
```
```gleam
import gleam/list
import gleaph as gp

pub fn main() -> Nil {
  let graph = [
    gp.new_node(0) |> gp.with_value("A")
    gp.new_node(1) |> gp.with_value("B")
    gp.new_node(2) |> gp.with_value("C")
  ]
  |> list.fold(gp.new(), gp.add_node)
  let graph = [
    gp.new_edge(from: 0, to: 1) |> gp.with_relation(100)
    gp.new_edge(from: 1, to: 2) |> gp.with_relation(200)
    gp.new_edge(from: 2, to: 0) |> gp.with_relation(300)
  ] |> list.fold(graph, gp.add_edge)
}
```

Further documentation can be found at <https://hexdocs.pm/gleaph>.

## Development

```sh
gleam run   # Run the project
gleam test  # Run the tests
```