Fix custom `TodoList` implementation API

The example custom implementation of `TodoList` doesn't take into account that the `TodoList` is created with `new`.  This change implements it as a function instead of an object to remedy this.