 
 class Leaf.ObservableArray extends Leaf.ObservableBase
-
-  # toLeafIDs = (ary) -> Array::map.call ary, (v) -> if v?.__observable then v.toLeafID() else v
 
   setData: (data = []) ->
     @_data = []


  _update: ->
    len = @_data.length

    if @length < len
      @_accessor i for i in [@length...len] by 1
    # else if @length > len
    #   @_removeAccessor i for i in [len...@length] by 1

    @length = len

    super()


    elements.map (el) => @_makeObservable el, @

  push: (elements...) ->
    len = @_data.length

    elen = elements.length
    elements = @_makeElementsObservable elements

    @_recordOperation
      method: 'push'
      args: elements
      added: [len, len + elen - 1]

    @_archiveCurrentData()
    @_data.push elements...
