       doUnsub()
     doUnsub = obs.subscribeInternal (event) ->
       afterTransaction ->
-        if not unsubd
+        unless unsubd
           reply = sink event
           if reply == Bacon.noMore
             unsub()

        reply = @push event
      else if event.isEnd()
        buffer.end = event
        if not buffer.scheduled
          buffer.flush()
      else
        buffer.values.push(event.value())

class Source
  constructor: (@obs, @sync, @subscribe, @lazy = false) ->
    @queue = []
    @subscribe = @obs.subscribeInternal unless @subscribe?
  toString: -> @obs.toString.call(this)
  markEnded: -> @ended = true
  consume: ->
