501798 (1) [Avatar] Offline
It is said that runtime type checks were added, via pattern matching, that the first arg is an instance of the TodoList struct.

def add_entry(todo_list, entry) do

def entries(todo_list, date) do

Shouldn't that be?

def add_entry(%TodoList{} = todo_list, entry) do

def entries(%TodoList{} = todo_list, date) do
sjuric (99) [Avatar] Offline
I've decided to remove the runtime type check in the 2nd edition. Therefore, the code is in fact correct, but the sentence should be removed. This will be done in the next MEAP release. Thanks for reporting!