Skip to content

Commit

Permalink
Fix test: type swap RWST
Browse files Browse the repository at this point in the history
  • Loading branch information
JordanMartinez committed May 22, 2018
1 parent c09ca5a commit 18fdbf3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/src/test/scala/scalaz/ReaderWriterStateTTest.scala
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ object ReaderWriterStateTTest extends SpecLite {

"ReaderWriterStateT can be trampolined without stack overflow" in {
import scalaz.Free._
val result = (0 to 10000).toList.map(ii => ReaderWriterStateT[String, Int, Unit, Trampoline, Int]((_, i: Int) => Trampoline.done(("", i, ii))))
.foldLeft(ReaderWriterStateT[String, Int, Unit, Trampoline, Int]((_, i: Int) => Trampoline.done(("", i, i))))( (a, b) => a.flatMap(_ => b))
val result = (0 to 10000).toList.map(ii => ReaderWriterStateT[Unit, String, Int, Trampoline, Int]((_, i: Int) => Trampoline.done(("", i, ii))))
.foldLeft(ReaderWriterStateT[Unit, String, Int, Trampoline, Int]((_, i: Int) => Trampoline.done(("", i, i))))( (a, b) => a.flatMap(_ => b))
10000 must_=== result.run((),0).run._3
}

Expand Down

0 comments on commit 18fdbf3

Please sign in to comment.