Chapter 8 shortened closures

var multiplyClosure = { (a, b) in

Is causing error “Ambiguous use of operator ‘*’”

Same error for

var multiplyClousure = {

    $0 * $1


@pawi552 Thanks very much for your question!

Most likely you’re getting the error because you have not identified what type “a” and “b” are. There is nothing to indicate that they can be multiplied. :slight_smile:

This topic was automatically closed after 166 days. New replies are no longer allowed.