   $watch this, options, (entered, exited) ->
     prev = @value
 
-    if not $_.isEmpty entered
-      @value = entered[0]
-    else
-      @value = def unless keepLast
+    @value = $first entered, (if keepLast then @value else def)
 
     @value isnt prev
 

    # Values are grouped by namespace.
    valuesByNamespace = Object.create null

    $_.each items, (item) ->
      return unless not cond? or cond.call item

      if bind?

      # Computes the current value.
      value = val.call item

      (valuesByNamespace[namespace] ?= {})[item.key] = value

    # Stops here if no values were computed.
    return if do ->
