[swift-users] What makes a good lazy procedure? And how to do it?

Daryle Walker darylew at mac.com
Fri Dec 29 20:40:07 CST 2017


I’ve been playing around with iterators/sequences/collections that partition to a set stride. For instance, given a collection with 16 elements and a stride argument of 3; I can generate a collection with 6 elements, the first 5 are sub-collections of count 3 and the last a sub-collection of count 1.

Now I’m wondering if I put these in a library on GitHub, should they be structured under the standard library’s “lazy” group of procedures? Or just separate types?

Oh, is there a modern guide for making lazy algorithm types? All the ones I’ve seen so far are from the Swift 1.0 days (when the algorithms were free functions instead of extensions of Sequence/Collection). Yes, I know I’m using busted vs. modern for a language only a few years old.

— 
Daryle Walker
Mac, Internet, and Video Game Junkie
darylew AT mac DOT com 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-users/attachments/20171229/e6ac7bda/attachment.html>


More information about the swift-users mailing list