[swift-evolution] protocol-oriented integers (take 2)
Rob Mayoff
mayoff at dqd.com
Sun Jan 15 10:27:35 CST 2017
On Sat, Jan 14, 2017 at 7:41 PM, Dave Abrahams via swift-evolution <
swift-evolution at swift.org> wrote:
> Oh... you mean that word(at:) itself would be linear, and thus
> algorithms that iterate the words linearly would be O(N^2)... yuck.
>
Couldn't you fix this by replacing `func word(at n: Int) -> UInt` with `var
words: Sequence<UInt>`, producing the words from least to most significant?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20170115/6bfcecd0/attachment.html>
More information about the swift-evolution
mailing list