This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Foundation | |
// used in map5 | |
let queue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0) | |
let group = dispatch_group_create() | |
extension Array { | |
func map2<U>(transform: Element ->U) -> [U] { | |
return reduce([]) { | |
$0 + [transform($1)] |