Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on What’s New in Swift 5.2. Parent comment
However, this has nothing to do with generics.If you're willing to sacrifice performance, you could easily write
extension Array { func take(_ n: Int) -> [Element] { Array(self[0..<n]) } }
There are no comments on this comment yet.
However, this has nothing to do with generics.If you're willing to sacrifice performance, you could easily write