Swift snippet #8 β Collection
Published in
1 min readDec 12, 2016
Monday, 12th December, 2016
You can find its Gist here!
The above snippet makes accessing after & before element in a collection way easier π. If the subsequent element doesnβt exist then it simply returns nil
.
Lets see its use case..
If you are wondering about the inception of Swift-Snippets or want to checkout more such snippets, you can find them here π