[swift-evolution] [Review] Add a Lazy flatMap for Sequences of Optionals

Max Moiseev 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
> https://lists.swift.org/mailman/listinfo/swift-evolution

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20151216/e934635c/attachment.html>

More information about the swift-evolution mailing list