What is purpose of `do` keyword

It seems it keyword is reserved

1 Like

It was once used together with iterators and has been kept as a keyword. Probably in case it will become useful again. This is the only example I can find of it in use. I seem to remember that it was a syntactic sugar for passing a closure to a method, but it's been a long time since they disappeared...



1 Like