Initialising structs
When you have a private constant in your struct, you will need to specify a constructor (ie. an init) in order to initialise it using the parameters.
i.e.
struct Cake {
var cost: Double { return rawAmount.asDouble }
private let rawCo...
coderlyn.hashnode.dev1 min read