Why the code below does not emit any result? What is going wrong in this Subject
? I would expect that on the moment I subscribe would get a result, namely the length I declare.
val subject = PublishSubject.create<String>()//PublishRelay.accept() does not work as well
subject.onNext("Alpha"
subject.onNext("Beta")
subject.onNext("Gamma")
subject.onComplete()
subject.map{ it.length }
.subscribe { println(it) }