It might seem pointless to create a do block on its own, because the lines of code will be run sequentially.
But it’s useful to have a very restrictive view of scope in an app. Whatever happens in a do block stays in that do block, which includes the creation of any variables. This is useful when you don’t want to get con…
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.