[swift-evolution] Using `map` and `flatMap` with implicit optionals

Nicholas Maccharoli nmaccharoli at gmail.com
Mon Oct 24 05:37:02 CDT 2016


Since `ImplicitlyUnwrappedOptional` types can be unwrapped with an `if let`
or
accessed as an optional as in `foo?.bar` then why shouldn't there be
implementations of `map` or `flatMap` for use with IUO types?

I think having `map` and `flatMap` available on types marked with "!" would
be convenient
but is there a good reason why that isn't the case now?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20161024/5ffd9503/attachment.html>


More information about the swift-evolution mailing list