Created
April 12, 2015 10:31
-
-
Save haya14busa/ce797bb2f1197bc84a3c 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
function! s:_extend(dict, src) | |
for [key, value] in items(a:src) | |
let a:dict[key] = value | |
unlet value | |
endfor | |
endfunction | |
function! s:main() abort | |
call s:_extend(l:, {'num': 1, 'str': 'hi', 'list': [1,2,3]}) | |
echo list | |
endfunction | |
call s:main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment