Here’s an idea for preventing the errors that happen when you pass an array the wrong index. You may have tried to use optional binding like if let
or guard let
with an this way. You’d think this would give you a closure in which the value at that index is available, or skip over the closure if there was no value at that inde…
Keep reading with a 7-day free trial
Subscribe to Type Safely to keep reading this post and get 7 days of free access to the full post archives.