November 2022
Intermediate to advanced
294 pages
5h 58m
English
It’s time to get in some practice with an extended workout with a real graph to see what we can discover about it when using the libgraph package. This will give us a sense of the completeness of libgraph as a graph library.
As an initial worked example, we’ll add the book graph to our library examples. This example will be helpful because of its small size and because we can get a simple visualization of the complete graph.
We’ll start off by creating a module for the book example:
| | defmodule NativeGraph.Examples.Book do |
| | |
| | # ... |
| | |
| | end |
Next, we’ll create the example graph. Because we’ll want to retrieve either one book or all books, let’s create two public entry points: book/1 (for one book) and books/1 (for all ...