You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A nice example of streams: computing using infinite Taylor series.
```scala
def sine() = integrate(0.0) {cosine}
def cosine() = for[Double] { integrate(-1.0) {sine} } { x => do emit(x.neg) }
>> println(eval(100, 2.0) {sine}) // this example
0.9092974268256817
>> println(sin(2.0)) // stdlib
0.9092974268256817
```
0 commit comments