Skip to content

Instantly share code, notes, and snippets.

@gseitz
Created November 30, 2011 22:57
Show Gist options
  • Save gseitz/1411631 to your computer and use it in GitHub Desktop.
Save gseitz/1411631 to your computer and use it in GitHub Desktop.
"FingerTree" should {
"apply effects in order" in {
import std.string._
import Id._
type StringWriter[A] = Writer[String, A]
val s: Writer[String, FingerTree[Int, Int]] = streamToTree(intStream.take(5)).traverseTree[StringWriter, Int, Int](x => Writer(x.toString, x))
val (w, a) = s.runT
(w, a.toStream) must be_===("12345", streamToTree(intStream.take(5)).toStream)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment