-str - Removes Source.unfoldInf

Motivation: Since it can be easily implemented inline on top of unfold
This commit is contained in:
Viktor Klang 2016-01-11 17:15:44 +01:00
parent 22ccbcea39
commit d65efc35c7
6 changed files with 18 additions and 37 deletions

View file

@ -252,7 +252,7 @@ class SourceSpec extends AkkaSpec with DefaultTimeout with ScalaFutures {
}
"generate an unbounded fibonacci sequence" in {
Source.unfoldInf((0, 1))({ case (a, b) (b, a + b) a })
Source.unfold((0, 1))({ case (a, b) Some((b, a + b) a) })
.take(36)
.runFold(List.empty[Int]) { case (xs, x) x :: xs }
.futureValue should ===(expected)