Read Sequence Hacking In Swift series; Iterator design pattern in Swift
Being hooked with sequence yesterday, today jumped to Sequence Hacking In Swift (I): Extending Sequences. Nothing new from this part. But this diagram worth keeping it:
Sequence Hacking In Swift (II): Extending Sequences. Nothing new as well. Good to feel I could write example better.
Sequence Hacking in Swift (III): Building Custom Sequences for Fun and Profit. Nothing new. But I feel I should practice implementing different kinds of sequences with AnyIterator
and without it.
Comparing How to make a custom sequence with three part post above - a sequence could be also an iterator, It this case only next()
method has to be implemented.
Another post on the topic: Iterator design pattern in Swift. It’s interesting because it refers to example from the gang of four book.
Didn’t know it’s possible to declare notmutating
setter for property in Swift. Sometime it’s useful to dig into Swift sources.
Refreshed memory about NSOperation
reading NSHipster’s NSOperation
and post NSOperation and NSOperationQueue To Improve Concurrency in iOS.