README.md

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

# Gnocco

Gnocco is a library for computing a possible canoncial cover for a set of functional dependencies.

This is a for-fun project made for the sole purpose of playing with the canoncial cover algorithm introduced at university.
I don't plan on maintaining this project.

_Named after "Can(onical) Co(ver) kind of sounds like Gnocco... let's go with that."_

```sh
gleam add cnocco
```

```gleam
import cnocco/cover
import cnocco/dependency

pub fn main() -> Nil {
  let assert Ok(deps) =
    cover.from_lists([
      #([1, 2], [3]),
      #([5, 9, 21], [23]),
      #([1, 2, 3, 4, 5], [10]),
      #([18, 20, 22], [25]),
    ])

  deps
  |> cover.from_dependencies()
  |> list.map(dependency.to_string)
  |> string.join("\n")
  |> io.println()
}
```

## Development

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