Scala and Kotlin let you achieve something similar, without requiring a dedicated `yield` keyword, as well as not introducing yet another type of function into the language... Personally, I always found the number of different types of function in Ruby to be bewildering.
Scala even allows multiple blocks to be passed in, used to good effect in the Cats effect `bracket` function, amongst others.
Scala even allows multiple blocks to be passed in, used to good effect in the Cats effect `bracket` function, amongst others.