Hi Everyone, I was playing around in Xcode 7.3 with this code...
*/*** * * Represents a future value of type U, from a computation that has not been done yet.* * */* *public struct Promise<T, U> {* * var futureValue: T -> U* * public func then<T,U,V>(closure: U -> V) -> Promise<T, V> {* * return Promise<T, V>(futureValue: {* * input in* * let value = futureValue(input)* * return closure(value)* * })* * }* *}* and came across the following error: *error: cannot invoke value of type 'T -> U' with argument list '((T))'* Can someone explain what is going on here? It looks like my closure should be accepting a value of T, but for some reason the types aren't matching up. Thanks, Blake
_______________________________________________ swift-users mailing list swift-users@swift.org https://lists.swift.org/mailman/listinfo/swift-users