     @consume = ->
       values = queue
       queue = []
-      values
+      -> values
     @push = (x) -> queue.push(x())
     @hasAtLeast = -> true
 


class Source
  constructor: (@obs, @sync, consume, @subscribe, lazy = false, queue = []) ->
    invoke = if lazy then _.id else (f) -> f()
    @subscribe = obs.subscribeInternal if not @subscribe?
    @markEnded = -> @ended = true
    @toString = @obs.toString
    if consume
      @consume = () -> invoke(queue.shift())
      @push  = (x) -> queue.push(x)
      @mayHave = (c) -> !@ended || queue.length >= c
      @hasAtLeast = (c) -> queue.length >= c
      @flatten = false
    else
      @consume = () -> invoke(queue[0])
      @push  = (x) -> queue = [x]
      @mayHave = -> true
      @hasAtLeast = -> queue.length

            for p in pats
               if match(p)
                 #console.log "match", p
                 functions = _.map ((i) -> sources[i.index].consume()), p.ixs
                 reply = sink trigger.e.apply ->
                   values = (fun() for fun in functions)
                   p.f(values ...)
                 if triggers.length and needsBarrier
                   triggers = _.filter nonFlattened, triggers
                 if reply == Bacon.noMore
