Skip to content

Commit 0cf7e0f

Browse files
update callbag to 110c554484bd21520c5f75983f9a3ccd72330018 to support flatMap (#1006)
1 parent d78d219 commit 0cf7e0f

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

autoload/lsp/callbag.vim

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
" https://github.com/prabirshrestha/callbag.vim#09ff9228257f5e8c68910fd9721c95f9d4fb6763
1+
" https://github.com/prabirshrestha/callbag.vim#110c554484bd21520c5f75983f9a3ccd72330018
22
" :CallbagEmbed path=autoload/lsp/callbag.vim namespace=lsp#callbag
33

44
let s:undefined_token = '__callbag_undefined__'
@@ -1209,6 +1209,15 @@ function! s:flattenInnerSourceCallback(data, t, d) abort
12091209
endfunction
12101210
" }}}
12111211

1212+
" flatMap() {{{
1213+
function! lsp#callbag#flatMap(F) abort
1214+
return lsp#callbag#operate(
1215+
\ lsp#callbag#map(a:F),
1216+
\ lsp#callbag#flatten(),
1217+
\ )
1218+
endfunction
1219+
" }}}
1220+
12121221
" scan() {{{
12131222
function! lsp#callbag#scan(reducer, seed) abort
12141223
let l:data = { 'reducer': a:reducer, 'seed': a:seed }

0 commit comments

Comments
 (0)