[swift-evolution] Passing an optional first argument to sequence(first:next:)
m.huenenberger at me.com
Mon Aug 15 15:10:06 CDT 2016
If you pass "nil" to "first" isn't this an empty sequence? So it would be redundant.
> Am 15.08.2016 um 01:27 schrieb Tim Vermeulen via swift-evolution <swift-evolution at swift.org>:
> sequence(first:next:) takes a non-optional first argument. Is there a reason for that? sequence(state:next:) allows empty sequences, and I don’t see why sequence(first:next:) shouldn’t. The fix would be to simply add the `?` in the function signature; no other changes are required to make it work.
> I considered just filing a bug report, but since this is a change of the public API...
> swift-evolution mailing list
> swift-evolution at swift.org
More information about the swift-evolution