0.7.0
What's Changed
Full Changelog: 0.6.3...0.7.0
ForkedArray Examples
let photoNames: [String] = ...
func isValidPhoto(named: String) async -> Bool { ... }
func downloadPhoto(named: String) async -> Photo { ... }
ForkedArray init
let forkedArray: ForkedArray<String, Photo> = ForkedArray(
photoNames,
filter: isValidPhoto(named:),
map: downloadPhoto(named:)
)
let photos: [Photo] = try await forkedArray.output()
Array ForkedArray init
let forkedArray = photoNames.fork
filter: isValidPhoto(named:),
map: downloadPhoto(named:)
)
let photos: [Photo] = try await forkedArray.output()
Array asyncFilter
let photoNames: [String] = try await photoNames.asyncFilter(isValidPhoto(named:))
Array asyncMap
let photos: [Photo] = try await photoNames.asyncMap(downloadPhoto(named:))