For example:

```java
public class OperatorRepeat<T> implements Operator<T, Observable<T>> {

    @Override
    public Subscriber<? super Observable<T>> call(final Subscriber<? super T> child) {
        return new Subscriber<Observable<T>>(child) {

            @Override
            public void onCompleted() {
                // ignore as we will keep repeating
            }

            @Override
            public void onError(Throwable e) {
                child.onError(e);
            }

            @Override
            public void onNext(final Observable<T> t) {

                Schedulers.trampoline().schedule(new Action1<Inner>() {

                    final Action1<Inner> self = this;

                    @Override
                    public void call(final Inner inner) {

                        t.subscribe(new Subscriber<T>(child) {

                            @Override
                            public void onCompleted() {
                                if (!child.isUnsubscribed()) {
                                    inner.schedule(self);
                                }
                            }

                            @Override
                            public void onError(Throwable e) {
                                child.onError(e);
                            }

                            @Override
                            public void onNext(T t) {
                                child.onNext(t);
                            }

                        });
                    }

                });
            }

        };
    }
}
```