On Fri, Oct 13, 2017 at 8:45 PM, Brent Royal-Gordon <br...@architechies.com> wrote:
> > On Oct 12, 2017, at 9:57 PM, Kevin Nattinger via swift-evolution < > swift-evolution@swift.org> wrote: > > > > That is reflected in the fact that over half the methods in the main > Sequence definition* make no sense and are not well-defined unless there is > a well-defined order to the sequence itself. What does it even mean to > `dropFirst()` in a Set? > > It means to skip the first element the set would normally have given you. > Which element this will be may be arbitrary, but this is still not useless: > > set.dropFirst().reduce(set.first!, …) > > Even elementsEqual(_:) does tell you something potentially valuable: > Whether two instances will end up giving the same result when processed by > an ordering-sensitive algorithm. > > We should change the name to something like orderEquals(_:), and maybe > change the lexicographicallyPrecedes(_:) method to something analogous like > orderPrecedes(_:), and then be done with it. > Fair enough suggestion as well.
_______________________________________________ swift-evolution mailing list swift-evolution@swift.org https://lists.swift.org/mailman/listinfo/swift-evolution