An effect type represents computations that may perform specified effects while producing values. Parameterizing Pull and Stream with F[_] keeps those effects explicit instead of hiding them inside one monolithic I/O wrapper. section 15.3
Pull makes the design concrete: Result produces a final value, Output emits a value, Eval wraps an action of type F[R], and FlatMap composes computations. Its step operation interprets these cases through a Monad[F]. section 15.3
Pure and effectful streams
Stream(1, 2, 3).repeat.take(5).toList yields List(1, 2, 3, 1, 2) as a pure Stream[Nothing, Int]. The same stream can be viewed as Stream[IO, Int], producing an IO[List[Int]]. section 15.3
enum Pull[+F[_], +O, +R]:
case Result[+R](result: R) extends Pull[Nothing, Nothing, R]
case Output[+O](value: O) extends Pull[Nothing, O, Unit]
case Eval[+F[_], R](action: F[R]) extends Pull[F, Nothing, R]
case FlatMap[+F[_], X, +O, +R](
source: Pull[F, O, X], f: X => Pull[F, O, R]) extends Pull[F, O, R]
Inspect the complete effect-parameterized Pull definition, including covariant parameters, Eval, and FlatMap. section 15.3
