anchor.diff:                  autofocus: true
                   init: -> @keydown (e) =>
                     if e.which == 13
  -                    todoList.tasks.push(new Task(@val().trim()))
  +                    tasks.push(new Task(@val().trim()))
                       @val('')
                 }
               ]
               div {}, bind ->
  -              if todoList.tasks.length() == 0
  +              if tasks.length() == 0
                   []
                 else
                   [
  
positive.code:                       id: 'toggle-all'
                        type: 'checkbox'
                        init: -> @change =>
                          for task in todoList.tasks.all()
                            task.isCompleted.set(@is(':checked'))
                      }
                      label {for: 'toggle-all'}, ['Mark all as complete']
                      ul {id: 'todo-list'}, todoList.tasks.map (task) ->
                        li {
                          class: bind ->
                            cls = []
                            cls.push('completed') if task.isCompleted.get()
                            cls.push('editing') if task.isEditing.get()
                            cls.join(' ')
                        }, do ->
                          if task.isEditing.get() then [
                            input {
  
negative.code:                           }, bind -> ["#{task.title.get()}"]
                            button {
                              class: 'destroy'
                              init: -> @click -> tasks.remove(task)
                            }
                          ]
                    ]
                    footer {id: 'footer'}, [
                      span {id: 'todo-count'}, bind -> [
                        strong {}, ["#{incomplete()}"]
                        if incomplete() == 1 then ' item left' else ' items left'
                      ]
                      button {
                        id: 'clear-completed'
                        init: -> @click =>
                          tasks.replace(task for task in tasks.all() when not task.isCompleted.get())
                      }, ['Clear completed']
                    ]
                  ]
  