     @eachChild (node) -> nodes.push node
     nodes
 
-  traverseChildren: (crossScope, func) ->
+  traverseChildren: (crossScope, func, arg) ->
     @eachChild (child) ->
-      return false if func(child) is false
-      child.traverseChildren crossScope, func
+      return false if (arg = func child, arg) is false
+      child.traverseChildren crossScope, func, arg
 
   invert: -> new Op '!', this
 

  # Convenience for the most common use of contains. Does the node contain
  # a pure statement?
  containsPureStatement: ->
    @isPureStatement() or @contains (node) -> node.isPureStatement()

  # `toString` representation of the node, for inspecting the parse tree.
  # This is what `coffee --nodes` prints out.

  # Recursively traverses down the *children* of the nodes, yielding to a block
  # and returning true when the block finds a match. `contains` does not cross
  # scope boundaries.
  contains: (block, arg) ->
    contains = no
    @traverseChildren false, (node, arg) ->
      if (rearg = block node, arg) is true then not contains = true else if arg? then rearg
    , arg
    contains

  # Is this node of a certain type, or does it contain the type?
