Hacker News new | ask | show | jobs
by jayrhynas 2317 days ago
Quick note about your functional examples - there's already a built-in version of `take` called `prefix` available on all Sequence types.
1 comments

Thanks. There’s also a prefix(while:) that appears to be takeWhile(), which I also needed.

https://developer.apple.com/documentation/swift/sequence/312...