             ])
     }
 
+    func testScan_Into_Accumulate() {
+        let scheduler = TestScheduler(initialClock: 0)
+
+        let xs = scheduler.createHotObservable([
+            .next(150, 1),
+            .next(220, 2),
+            .completed(250)
+            ])
+
+        let seed = 42
+
+        let res = scheduler.start {
+            xs.scan(into: seed) { $0 += $1 }
+        }
+
+        XCTAssertEqual(res.events, [
+            .next(220, seed + 2),
+            .completed(250)
+            ])
+
+        XCTAssertEqual(xs.subscriptions, [
+            Subscription(200, 250)
+            ])
+    }
+
     func testScan_Seed_Throw() {
         let scheduler = TestScheduler(initialClock: 0)
 

            ])
    }

    func testScan_Seed_Return() {
        let scheduler = TestScheduler(initialClock: 0)


            ])
    }

    func testScan_Into_AccumulatorThrows() {
        let scheduler = TestScheduler(initialClock: 0)

        let xs = scheduler.createHotObservable([
            .next(150, 1),
            .next(210, 2),
            .next(220, 3),
            .next(230, 4),
            .next(240, 5),
            .completed(250)
            ])

        let seed = 42

        let res = scheduler.start {
            xs.scan(into: seed) { a, e in
                if e == 4 {
                    throw testError
                } else {
                    a += e
                }
            }
        }

        XCTAssertEqual(res.events, [
            .next(210, seed + 2),
            .next(220, seed + 2 + 3),
            .error(230, testError)
            ] as [Recorded<Event<Int>>])

        XCTAssertEqual(xs.subscriptions, [
            Subscription(200, 230)
            ])
    }


    #if TRACE_RESOURCES
        func testScanReleasesResourcesOnComplete() {
            _ = Observable<Int>.just(1).scan(0, accumulator: +).subscribe()
