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
Describe how result builders interact with "build partial block" (#151)
The `buildPartialBlock(first:)` and
`buildPartialBlock(accumulated:next:)` methods are described by the
"Result-Building Methods" subsection of `@resultBuilder`, but there is
no corresponding detail provided in the "Result Transformations"
subsection. This adds the appropriate description, including example
code which demonstrates the intended use case.
The point is admittedly partly moot in Swift 5.9, given that it became
possible to write a result builder that has `func buildBlock<each D:
Drawable>(_ components: repeat each D) -> some Drawable`, but the
`buildPartialBlock()` methods may still be a better fit for some use
cases. Even if this were not the case, they still exist and should be
fully documented.
0 commit comments