Tutorial by Examples

Behaviours are a list of functions specifications that another module can implement. They are similar to interfaces in other languages. Here’s an example behaviour: defmodule Parser do @callback parse(String.t) :: any @callback extensions() :: [String.t] end And a module that implements ...

Page 1 of 1