     endMarker = {}
     withDescription(this, "takeUntil", stopper, Bacon.groupSimultaneous(@mapEnd(endMarker), stopper.skipErrors())
       .withHandler((event) ->
-        if !event.hasValue()
+        unless event.hasValue()
           @push event
         else
           [data, stopper] = event.value()

    withDescription(this, "holdWhen", valve,
      # the filter(false) thing is added just to keep the subscription active all the time (improves stability with some streams)
      @filter(false).merge valve_.flatMapConcat (shouldHold) =>
        if !shouldHold
          @takeUntil(putToHold)
        else
          @scan([], ((xs,x) -> xs.concat(x)), {eager:true}).sampledBy(releaseHold).take(1).flatMap(Bacon.fromArray))

    pats.push pat if patSources.length > 0
    i = i + 2

  unless sources.length
    return Bacon.never()

  sources = _.map Source.fromObservable, sources
