- write a method,
yields_to_block, that yields to a block and executes it just once.- invoke
yields_to_blockwithout passing it a block. What happens?
- invoke
- write a method,
encore!, that yields to the same block twice.- invoke
encore!by passing it a block that prints the title of your favorite song to the console.
- invoke
- write a method,
applaud_all_acts, which takes a block and executes it 5 times. After each execution of the block, the method should print(applause)to the console.- invoke this method with some golf-related code. Golf people applaud everything.
Last active
August 29, 2015 14:05
-
-
Save vanderhoop/3e6723b2d3efd5cebc33 to your computer and use it in GitHub Desktop.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment