concept Boolean in category swift

appears as: Boolean, Boole
Swift in Depth

This is an excerpt from Manning's book Swift in Depth.

For example, you can unwrap a customer’s firstName and combine it with a Boolean, such as the balance property, to write a customized message.

Listing 4.7. Combining a Boolean with an optional
if let firstName = customer.firstName, customer.balance > 0 {
    let welcomeMessage = "Dear \(firstName), you have money on your account,
     want to spend it on mayonnaise?"
}

4.10.1. Reducing a Boolean to two states

You can end up with an optional Boolean, for example, when you’re parsing data from an API in which you try to read a Boolean, or when retrieving a key from a dictionary-.