Skip to content

Chapter 6

Latest
Compare
Choose a tag to compare
@joesus joesus released this 17 Feb 00:25
Handles six pack requirement

There were some compromises at the end

* was forced to use a protocol to simulate what you get for free in ruby with dynamic type
* was forced to add extension to string to get compiler to shut up and to complete “to_s” refactor
* wasn’t able to complete the refactor to have successor return BottleNumber instead of Int because swift can’t return an object OR an unrelated primitive and to put it in a protocol would have been more steps, and to put it in a struct and make it conform to interator protocol seems like overkill