Created
October 31, 2014 08:37
-
-
Save aoitaku/54ef3e051abc7fc8b932 to your computer and use it in GitHub Desktop.
スタックに push しながら yield して処理後に確実に pop したいときのワンライナー
This file contains hidden or 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
-> stack, arg { stack.tap { stack.push(arg) } and yield.tap { stack.pop } } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment