         else
           [data, stopper] = event.value()
           if stopper.length
+#            console.log(_.toString(data), "stopped by", _.toString(stopper))
             @push end()
           else
             reply = Bacon.more

  new EventStream describe(Bacon, "fromArray", values), (sink) ->
    unsubd = false
    reply = Bacon.more
    while (reply != Bacon.noMore) and !unsubd
      if i >= values.length
        sink(end())
        reply = Bacon.noMore
      else
        value = values[i++]
        reply = sink(toEvent(value))
    -> unsubd = true

Bacon.mergeAll = (streams...) ->


  hasWaiters = -> waiterObs.length > 0

  { whenDoneWith, hasWaiters, inTransaction, currentEventId, wrappedSubscribe, afterTransaction }
)()

Bacon.EventStream = EventStream
