Inspect
Learn the Inspect built-in protocol in Elixir.
We'll cover the following...
Introduction
This is the protocol that’s used to inspect a value. The rule is simple. If we can return a representation that’s a valid Elixir literal, do so. Otherwise, prefix the representation with #Typename
.
We could just delegate the inspect
function to the Elixir default. That’s what we’ve been doing so far. But we can do better. Not surprisingly, we do that by implementing the Inspect
...