         return task
     }
     
-    class func all(tasks: HNTask[]) -> HNTask {
+    class func all(tasks: [HNTask]) -> HNTask {
         let task = HNTask()
         let lock = NSObject()
         var count = tasks.count
-        let results = Array<Any?>(count: count, repeatedValue: nil)
-        
+        var results = [Any?](count: count, repeatedValue: nil)
+
         for (index, value) in enumerate(tasks) {
             value.continueWith { context in
                 if context.isError() {

        return task
    }
    
    class func allSettled(tasks: HNTask[]) -> HNTask {
        let task = HNTask()
        let lock = NSObject()
        var count = tasks.count
        let results = Array<Any?>(count: count, repeatedValue: nil)
        
        for (index, value) in enumerate(tasks) {
            value.continueWith { context in

                objc_sync_exit(lock)
                
                if doResolve {
                    let resultValue: Any = results
                    task.complete(result: resultValue, error: nil)
                }
                return nil
            }
