-
-
Save Osse/360eac164e328a97c919 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! Freqs2(list) | |
let freqs = {} | |
call map(copy(a:list), 'extend(freqs, { v:val : 0 })') | |
" for line in getline(1, '$') | |
" call map(freqs, 'v:val + ( line =~ ''\<'' . v:key . ''\>'' )') | |
" endfor | |
call map(getline(1, '$'), 'map(freqs, "v:val + (''" . v:val . "'' =~ ''\\<'' . v:key . ''\\>'' )")') | |
return freqs | |
endfunction |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment