Collatz: Gleam 💖⭐💖
Colourised Collatz Coral; derived from this original by Edmund Harriss
--- Functions related to [the Collatz/Syracuse/3N+1 problem](https://en.wikipedia.org/wiki/Collatz_conjecture), implemented in [Gleam](https://gleam.run/). ## Badges [](https://hex.pm/packages/collatz) [](https://hexdocs.pm/collatz/) ## Getting Started [To install the latest from Hex](https://hex.pm/packages?search=collatz) ([or as it appears on gleam packages](https://packages.gleam.run/?search=collatz)); ```sh gleam add collatz ``` ## Usage Provides the basic functionality to interact with the Collatz conjecture. The parameterisation uses the same `(P,a,b)` notation as Conway's generalisations. Besides the function and reverse function, there is also functionality to retrieve the hailstone sequence, the "stopping time"/"total stopping time", or tree-graph. The only restriction placed on parameters is that both `P` and `a` can't be `0`. ### Usage Example ```gleam import collatz pub fn main() { // TODO: An example of the project in use } ``` ## [ generated docs](https://skenvy.github.io/Collatz/gleam) ## [HexDocs](https://hexdocs.pm/collatz) ## Developing ### The first time setup ```sh git clone https://github.com/Skenvy/Collatz.git && cd Collatz/gleam && ``` ### Iterative development ```sh gleam run # Run the project gleam test # Run the tests gleam shell # Run an Erlang shell ```