   $watch this, options, (entered, exited) ->
     changed = false
 
-    for value in entered
+    $each entered, (value) =>
       if @value.indexOf value is -1
         @value.push value
         changed = true
 
-    for value in exited
+    $each exited, (value) =>
       changed = true if $removeValue @value, value
 
     changed


    throw new Error 'cannot use keys and rules' unless $_.isEmpty rules

    $_.each keys, (key) -> collection.on "key=#{key}", processOne

    # Handles existing items.
    process 'enter', collection.getRaw keys
  else if not $_.isEmpty rules
    # Matching is done the rules.

    $_.each rules, (rule) -> collection.on "rule=#{rule}", process

    # TODO: Inefficient, is there another way?
    rules = do -> # Minor optimization.
      tmp = Object.create null
      tmp[rule] = true for rule in rules
      tmp
    $_.each collection.getRaw(), (item) ->
      processOne 'enter', item if item.rule of rules
  else
    # No matching done.

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

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

      if bind?
