# Follow-up on AsyncSequence and parity with Sequence based APIs

**URL:** <https://forums.swift.org/t/follow-up-on-asyncsequence-and-parity-with-sequence-based-apis/44893>\
**Category:** Pitches\
**Created:** [February 18, 2021, 10:38pm UTC](https://forums.swift.org/t/follow-up-on-asyncsequence-and-parity-with-sequence-based-apis/44893 "2021-02-18T22:38:24Z")\
**Posts on this page:** 1\
**Showing post:** 21

<div class="post-metadata">

**Author:** ![Jon\_Shier](https://sea2.discourse-cdn.com/swift/user_avatar/forums.swift.org/jon_shier/32/921_2.png) [@Jon\_Shier](https://forums.swift.org/u/Jon_Shier)\
**Post date:** [June 18, 2021, 1:16am UTC](https://forums.swift.org/t/follow-up-on-asyncsequence-and-parity-with-sequence-based-apis/44893/21 "2021-06-18T01:16:08Z")

</div>

I agree, `forEach`, and parity with `Sequence`, is important for `AsyncSequence`'s ergonomics and adoption.

IIRC, there was resistance to adding `forEach` on `Sequence` in the first place, due to purity concerns in the "functional" APIs. That is, people wanted such APIs to remain for transforming values, leaving the looping to `for`. I think history has shown this to be pretty wrong. APIs which force users to switch between paradigms or contexts, for lack of a better term, are always sources of friction. This friction either frustrates the users on a regular basis or, for the more motivated, pushes the user into creating equivalent APIs in their context. We saw this with `forEach` and `Result`. I think we still see it in the `Optional` vs. throwing context. And we would see it here if there weren't an equivalent looping API.

---

_[View the full topic](https://forums.swift.org/t/follow-up-on-asyncsequence-and-parity-with-sequence-based-apis/44893)._
