[swift-users] LazyCollection.map()
Aaron Bohannon
aaron678 at gmail.com
Tue Jun 28 17:37:52 CDT 2016
Does the code below have a well-defined behavior?
struct Nope: ErrorType {}
func f(i: Int) throws -> Int {
guard i < 5 else { throw Nope() }
return i
}
do {
let _ = try Array(0 ..< 10).lazy.map(f)
print("lazy")
} catch (let e) {
print(e)
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-users/attachments/20160628/59bedbf9/attachment.html>
More information about the swift-users
mailing list