Re: [swift-evolution] I think we need more to our type calculus

2017-02-09 Thread Joe Groff via swift-evolution
> On Feb 8, 2017, at 12:09 PM, Daryle Walker via swift-evolution > wrote: > > I’ve been trying to get the maximum of a list of counts. I started by using > “myCollection.map { $0.myCountProperty }.reduce(0, max)”. Then I thought I > should really use the value

Re: [swift-evolution] I think we need more to our type calculus

2017-02-08 Thread Slava Pestov via swift-evolution
> On Feb 8, 2017, at 12:09 PM, Daryle Walker via swift-evolution > wrote: > > I’ve been trying to get the maximum of a list of counts. I started by using > “myCollection.map { $0.myCountProperty }.reduce(0, max)”. Then I thought I > should really use the value

Re: [swift-evolution] I think we need more to our type calculus

2017-02-08 Thread Xiaodi Wu via swift-evolution
type(of:) is the Swift 3 spelling of what was known in Swift 2 as dynamicType. On Wed, Feb 8, 2017 at 14:09 Daryle Walker via swift-evolution < swift-evolution@swift.org> wrote: > I’ve been trying to get the maximum of a list of counts. I started by > using “myCollection.map { $0.myCountProperty

[swift-evolution] I think we need more to our type calculus

2017-02-08 Thread Daryle Walker via swift-evolution
I’ve been trying to get the maximum of a list of counts. I started by using “myCollection.map { $0.myCountProperty }.reduce(0, max)”. Then I thought I should really use the value closest to negative infinity as the base. The problem is how to get that value. The current hard-coded “0” works