heckj / swiftui-notes

content for Using Combine - notes on learning Combine with UIKit and SwiftUI
https://heckj.github.io/swiftui-notes/
MIT License
1.98k stars 205 forks source link

Add illustrations for "merge" & "zip" operators #255

Open gatamar opened 2 years ago

gatamar commented 2 years ago

While the description of these operators is very good, it would be nice to have also the illustrations.

Operators:

Instructions:

Output:

heckj commented 2 years ago

These are both good ideas - I gave up on the automated marble diagrams after trying them, and was hand-creating the diagrams that I used in this content using OmniGraffle and then exporting the content to individual SVG files.

And if you're not already aware of them, the "next generation" of this kind of code for swift (swift-async-algorithms) is being developed in the open by the Apple team and open source contributors, and most especially has lovely detailed guides of what each algorithm does, how they're naming it, and why and how it's different from the other algorithms (at https://github.com/apple/swift-async-algorithms/tree/main/Sources/AsyncAlgorithms/AsyncAlgorithms.docc/Guides). All of which didn't happen originally with Combine (and hence my cobbling all the tests and writing for this content).

heckj commented 2 years ago