-
-
Save domgetter/bcb438d16f0f890dd48e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def yields_3 | |
yield 3 | |
end | |
yields_3 do |n| | |
puts n | |
end | |
# this puts 3 since 3 was yielded and 3 was stored in n |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment