Cannot invoke 'reduce' with an argument list of type ''

578 Views Asked by At

I was using the "Swift encrypt/decrypt string using XOR" on this website to encrypt my string in my project. It worked fine with xCode 6.1, but after I updated my xCode to 6.4, it's not working anymore.

func encrypt(message:String, key:String) -> String {
    return reduce(Zip2(message, key), "") { $0 + self.encrypt($1) }
}

xCode said: Cannot invoke 'reduce' with an argument list of type '(Zip2<String, String>, String, (_, _) -> _)'

Can someone please help me with this? Thank you!

0

There are 0 best solutions below