An implementation of the basic task list logic (in CoffeeScript)