Hi Andy!

On Di, 10 Nov 2009, Andy Wokula wrote:

> 
> Christian Brabandt schrieb:
> > On Tue, November 10, 2009 12:19 pm, Andy Wokula wrote:
> >> let in_list = ["foo", "bar"]
> >> let out_dict = {}
> >> call map(in_list, 'KeepVal(extend(out_dict, {v:val : 1}))')
> >
> > You don't need KeepVal():
> > :call map(copy(in_list), 'extend(out_dict, {v:val : 1})')
> 
> I just didn't like getting a list full of dict references.  And the
> return value of map() will be less "junky".

Okay, how about

:let @_=string(map(copy(in_list), 'extend(out_dict, {v:val : 1})'))

regards,
Christian
-- 
  • EFI is this other Intel brain-damage (the first one being ACPI).
       Torvalds, Linus (2006-07-24).

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply via email to