Skip to content

Instantly share code, notes, and snippets.

@banshee
Created May 17, 2014 23:31
Show Gist options
  • Save banshee/14bdade885fb11e568cb to your computer and use it in GitHub Desktop.
Save banshee/14bdade885fb11e568cb to your computer and use it in GitHub Desktop.
object TopicPlayground extends App {
val t: Topic[String] = scalaz.stream.async.topic()
val sub1 = t.subscribe
val out1 = sub1
.flatMap(x => Process.tell(s"raw value: $x") ++ Process.emitO(x.length))
t.publishOne("foo")
t.close
val oneRun = out1.runLog.run
println(s"oneRun: $oneRun")
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment