-str - Removes Source.unfoldInf
Motivation: Since it can be easily implemented inline on top of unfold
This commit is contained in:
parent
22ccbcea39
commit
d65efc35c7
6 changed files with 18 additions and 37 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue