Wednesday, January 11, 2023

Vim9 Create its own Lambda Def Function

Hi,

Is it possible to create its own lambda function ?

I explain I got this def func :

def OutBufAdd(outbuf: list<string>, str: string)
  EchoMsg(str)
  outbuf->add(str)
enddef

Client code is using it as this :
OutBufAdd(outbuf, 'foo')
....
OutBufAdd(outbuf, 'bar')
....
OutBufAdd(outbuf, 'barfoofoo')
....
OutBufAdd(outbuf, 'barbar')

Regarding this, it is always in this case OutBufAdd(outbuf, somestring)

Is it possible to modify OutBufAdd(outbuf,  somestring  ) to OutBufAdd->(somestring) ?

Thank you for all
Nicolas



--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/d80f565a-e6a0-417a-b14c-fc81558ace16n%40googlegroups.com.

No comments:

Post a Comment