Closed gwynne closed 3 years ago
:exclamation: No coverage uploaded for pull request base (
main@2a19834
). Click here to learn what that means. The diff coverage isn/a
.
@@ Coverage Diff @@
## main #82 +/- ##
=======================================
Coverage ? 76.51%
=======================================
Files ? 26
Lines ? 1733
Branches ? 0
=======================================
Hits ? 1326
Misses ? 407
Partials ? 0
Flag | Coverage Ξ | |
---|---|---|
unittests | 76.51% <0.00%> (?) |
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
Legend - Click here to learn more
Ξ = absolute <relative> (impact)
,ΓΈ = not affected
,? = missing data
Powered by Codecov. Last update 2a19834...cffd27e. Read the comment docs.
I have to admit, everyone - this one's just a little bit for fun. But with Swift 5.5 and its concurrency magic around the corner, why not?! π
Changes:
EventLoopFuture.mapEachFlat(_:)
, shorthand forfuture.map { $0.flatMap(...) }
. Complements.mapEach(_:)
and.mapEachCompact(_:)
. Per the existing naming "convention", this is the "map a sequence of sequences to a sequence" utility, and.flatMapEach(_:)
is the "map a sequence to a sequence of futures" utility. It's not confusing at all! Totally!!.mapEach(_:)
,.mapEachCompact(_:)
, and.mapEachFlat(_:)
which acceptKeyPath
s in place of transformation closures.If you find yourself trying to articulate your argument against having these additions, you've already missed the point π.