New to Swift and saw code from Standford open course of Swift programming as below:
if pending != nil {
acccumulator = pending!.binaryFunction(pending!.firstOperand,acccumulator)
pending = nil
}
As I learn about unwrapping, pending
, in this case, is ensured not to be nil inside if
block, then why should I use !
to unwrap pending while using it?