Skip to content

Instantly share code, notes, and snippets.

@haya14busa
Created April 12, 2015 10:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save haya14busa/ce797bb2f1197bc84a3c to your computer and use it in GitHub Desktop.
Save haya14busa/ce797bb2f1197bc84a3c to your computer and use it in GitHub Desktop.
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