[swift-evolution] [Review] Add a Lazy flatMap for Sequences of Optionals
moiseev at apple.com
Wed Dec 16 14:49:44 CST 2015
FWIW: Strictly speaking Option in Scala is not a collection. It happens to have all the methods that make it look like one and also an implicit conversion that creates a List of zero or one element. Which is kind of what Dave suggests.
> On Dec 15, 2015, at 7:21 PM, Rob Mayoff via swift-evolution <swift-evolution at swift.org> wrote:
> What's the advantage? Why would we want to have a type that is isomorphic to Optional, except that conforms to CollectionType?
> My question (apologies if it has been answered already) is: Why isn't Optional a CollectionType, like it is in Scala?
> swift-evolution mailing list
> swift-evolution at swift.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the swift-evolution