func (o ObservableFoo) MergeMapBar(project func(foo) ObservableBar) ObservableBar {
	return o.MapObservableBar(project).MergeAll()
}
jig:template Observable<Foo> MergeMap<Bar>
MergeMapBar transforms the items emitted by an ObservableFoo by applying a
function to each item an returning an ObservableBar. The stream of ObservableBar
items is then merged into a single stream of Bar items using the MergeAll operator.
package rx
import (
	"sync"
	"sync/atomic"
)
func MergeFoo(observables ...ObservableFoo) ObservableFoo {
	if len(observables) == 0 {
		return EmptyFoo()
	}
	return observables[0].MergeWith(observables[1:]...)
}
func (o ObservableFoo) MergeWith(other ...ObservableFoo) ObservableFoo {
	if len(other) == 0 {
		return o
	}
	observable := func(observe FooObserver, subscribeOn Scheduler, subscriber Subscriber) {
		var observers struct {
			sync.Mutex
			done bool
			len  int
		}
		observer := func(next foo, err error, done bool) {
			observers.Lock()
			defer observers.Unlock()
			if !observers.done {
				switch {
				case !done:
					observe(next, nil, false)
				case err != nil:
					observers.done = true
					var zero foo
					observe(zero, err, true)
				default:
					if observers.len--; observers.len == 0 {
						var zero foo
						observe(zero, nil, true)
					}
				}
			}
		}
		observers.len = 1 + len(other)
		o.AutoUnsubscribe()(observer, subscribeOn, subscriber)
		for _, o := range other {
			if subscriber.Subscribed() {
				o.AutoUnsubscribe()(observer, subscribeOn, subscriber)
			}
		}
	}
	return observable
}