func (o ObservableRGBA) DistinctUntilChanged(equal ...func(color.RGBA, color.RGBA) bool) ObservableRGBA {
	var same []func(interface{}, interface{}) bool
	if len(equal) != 0 {
		same = append(same, func(prev, curr interface{}) bool { return equal[0](prev.(color.RGBA), curr.(color.RGBA)) })
	}
	return o.AsObservable().DistinctUntilChanged(same...).AsObservableRGBA()
}
jig:name ObservableRGBA_DistinctUntilChanged
DistinctUntilChanged only emits when the current value is different from the last.
package DistinctUntilChanged
import (
	"fmt"
	"image/color"
	"github.com/reactivego/scheduler"
	"github.com/reactivego/subscriber"
)
type Scheduler = scheduler.Scheduler
type Subscriber = subscriber.Subscriber
type IntObserver func(next int, err error, done bool)
type ObservableInt func(IntObserver, Scheduler, Subscriber)
func FromInt(slice ...int) ObservableInt {
	observable := func(observe IntObserver, scheduler Scheduler, subscriber Subscriber) {
		i := 0
		runner := scheduler.ScheduleRecursive(func(self func()) {
			if subscriber.Subscribed() {
				if i < len(slice) {
					observe(slice[i], nil, false)
					if subscriber.Subscribed() {
						i++
						self()
					}
				} else {
					var zero int
					observe(zero, nil, true)
				}
			}
		})
		subscriber.OnUnsubscribe(runner.Cancel)
	}
	return observable
}
type RGBAObserver func(next color.RGBA, err error, done bool)
type ObservableRGBA func(RGBAObserver, Scheduler, Subscriber)
func FromRGBA(slice ...color.RGBA) ObservableRGBA {
	observable := func(observe RGBAObserver, scheduler Scheduler, subscriber Subscriber) {
		i := 0
		runner := scheduler.ScheduleRecursive(func(self func()) {
			if subscriber.Subscribed() {
				if i < len(slice) {
					observe(slice[i], nil, false)
					if subscriber.Subscribed() {
						i++
						self()
					}
				} else {
					var zero color.RGBA
					observe(zero, nil, true)
				}
			}
		})
		subscriber.OnUnsubscribe(runner.Cancel)
	}
	return observable
}
func (o Observable) DistinctUntilChanged(equal ...func(interface{}, interface{}) bool) Observable {
	observable := func(observe Observer, subscribeOn Scheduler, subscriber Subscriber) {
		if len(equal) == 0 {
			equal = append(equal, func(prev, curr interface{}) bool { return prev == curr })
		}
		var seen struct {
			initialized	bool
			value		interface{}
		}
		observer := func(next interface{}, err error, done bool) {
			if !done {
				if seen.initialized && equal[0](seen.value, next) {
					return
				} else {
					seen.initialized = true
					seen.value = next
				}
			}
			observe(next, err, done)
		}
		o(observer, subscribeOn, subscriber)
	}
	return observable
}
func (o ObservableInt) DistinctUntilChanged(equal ...func(int, int) bool) ObservableInt {
	var same []func(interface{}, interface{}) bool
	if len(equal) != 0 {
		same = append(same, func(prev, curr interface{}) bool { return equal[0](prev.(int), curr.(int)) })
	}
	return o.AsObservable().DistinctUntilChanged(same...).AsObservableInt()
}