April 2018
Beginner to intermediate
406 pages
9h 33m
English
IEx has a really handy helper function available to us: i. This function comes in two separate arities, i/0 and i/1 (arities, in this case, being the number of arguments that we have to supply to each version of the function). i/0 displays information about the last value output in IEx, whereas i/1 displays information about a particular value or variable. Let's take a look at a few examples:
iex(3)> x = 55iex(4)> iTerm5Data typeIntegerReference modulesIntegerImplemented protocolsIEx.Info, Inspect, List.Chars, String.Chars
Let's talk about what the preceding example is giving us. First, it tells us the Term, which almost literally means the value itself. Next, we have the Data type, which tells us ...