[swift-evolution] Dictionary Enhancements

Brent Royal-Gordon brent at architechies.com
Mon Feb 20 19:52:28 CST 2017

> On Feb 20, 2017, at 10:19 AM, Ben Cohen <ben_cohen at apple.com> wrote:
> As it is right now, that wouldn’t distinguish it since Sequence.filter on Dictionary can already take a (Key,Value)->Bool transformation since (Key,Value) is the Element type:
> let d = [1:"1"]
> let f: (Int,String)->Bool = {_,_ in true }
> d.filter(f) // [(key: 1, value: "1")]

From what I understand, this is implicit tuple splatting and shouldn't be allowed anymore. Or am I wrong about that?

Brent Royal-Gordon

More information about the swift-evolution mailing list