# Exploring Graphs with Elixir: Chapter 3 is missing some macros

**URL:** <https://forum.devtalk.com/t/exploring-graphs-with-elixir-chapter-3-is-missing-some-macros/9058>\
**Category:** PragProg Customers\
**Tags:** book-exploring-graphs-with-elixir, errata\
**Created:** [24 April 2021 20:32 UTC](https://forum.devtalk.com/t/exploring-graphs-with-elixir-chapter-3-is-missing-some-macros/9058 "2021-04-24T20:32:29Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![mvellandi](https://forum.devtalk.com/user_avatar/forum.devtalk.com/mvellandi/32/2726_2.png) [@mvellandi](https://forum.devtalk.com/u/mvellandi)\
**Post date:** [25 April 2021 13:58 UTC](https://forum.devtalk.com/t/exploring-graphs-with-elixir-chapter-3-is-missing-some-macros/9058/2 "2021-04-25T13:58:41Z")

</div>

In  
_p.96 – Ch 3 \> Storing Graphs in the Graph Store \> Using Macros_  
the code comment in graph.ex

```auto
quote do
   # other (listings, new_graph) functions here
   def read_graph...
   def write_graph...
end

```

implies the author will define a few more functions later, or WE will add them on our own.

On the following page (97), we’re told we can check out the whole NativeGraph library functions:

```auto
iex> NativeGraph.[TAB]
...

```

which includes ALL the functions it will **eventually output** when ALL are defined in the **using** macros in both GraphCommons.Graph and GraphCommons.Query

The author just needs to update this code snippet to correspond with the next paragraph in the book.

Through the end of Ch 3, I see only two more functions used:  
list\_graphs  
list\_graphs\_dir

which I started defining in the next subsection, where first used:  
_p.100 – Ch 3 \> Storing Graphs in the Graph Store \> Listing_

NOTE: I just noticed the author didn’t include these two functions in the source code either.

Here’s what I additionally wrote in my GraphCommons.Graph **using** macro

```auto
quote do

      def list_graphs(file_test \\ :exists?) do
         GraphCommons.Graph.list_graphs(unquote(graph_type), file_test)
      end

      def list_graphs_dir(graph_dir) do
         GraphCommons.Graph.list_graphs_dir(graph_dir, unquote(graph_type))
      end

   def read_graph...
   def write_graph...

end

```

---

_[View the full topic](https://forum.devtalk.com/t/exploring-graphs-with-elixir-chapter-3-is-missing-some-macros/9058)._
