Last active
May 5, 2017 03:22
-
-
Save bounceme/837c724b9dfc4828e81141cceeccaddb to your computer and use it in GitHub Desktop.
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
function! g:Compose(...) | |
let l:args = a:000 | |
return {...->eval(execute("let ret = a:000|let i = (len(".string(l:args).")-1)" | |
\ ."|while i>-1|let ret = [call(".string(l:args)."[i],ret)]" | |
\ ."|let i -= 1|endwhile|echon string(ret[0])"))} | |
endfunction | |
echom Compose('toupper','join','uniq','split','printf')('%s','aa bb aa aa b b b b') | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment