   Scope:        this.Scope
 
 # Import the helpers we plan to use.
-{compact, flatten, merge, del, include, index_of}: helpers
+{compact, flatten, merge, del, include, index_of, starts}: helpers
 
 #### BaseNode
 

  # If the code generation wishes to use the result of a complex expression
  # in multiple places, ensure that the expression is only ever evaluated once,
  # by assigning it to a temporary variable.
  compile_reference: (o) ->
    reference: literal o.scope.free_variable()
    compiled:  new AssignNode reference, this
    [compiled, reference]

    @exclusive: !!exclusive

  # Compiles the range's source variables -- where it starts and where it ends.
  # But only if they need to be cached to avoid double evaluation.
  compile_variables: (o) ->
    [@from, @from_var]: @from.compile_reference o, true
    [@to, @to_var]:     @to.compile_reference o, true
    parts: []
    parts.push @from.compile o if @from isnt @from_var
    parts.push @to.compile o if @to isnt @to_var
    tail: "\n$o.indent"
    if parts.length then "${parts.join('; ')};$tail" else tail

  # When compiled normally, the range returns the contents of the *for loop*
  # needed to iterate over the values in the range. Used by comprehensions.
