Created
May 4, 2016 18:14
-
-
Save mvk/ad65c6d83d586ba74bf8134929526328 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 multiwrap(wrappers, body) { | |
def _multiwrap(wrappers, idx, body) { | |
if (idx == wrappers.size()) { | |
body() | |
} else { | |
wrap(wrappers.get(idx)) { | |
_multiwrap(wrappers, idx + 1, body) | |
} | |
} | |
} | |
_multiwrap(wrappers, 0, body) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment