2013-01-07から1日間の記事一覧
こんな感じで書けるかな。 [ソース] function! s:memoize(func) let Func = a:func let cache = {} return reti#execute(join([ \ "if !has_key(cache, string(a:000))", \ " let cache[string(a:000)] = call(Func, a:000)", \ "endif", \ "return cache[st…
こんな感じで書けるかな。 [ソース] function! s:memoize(func) let Func = a:func let cache = {} return reti#execute(join([ \ "if !has_key(cache, string(a:000))", \ " let cache[string(a:000)] = call(Func, a:000)", \ "endif", \ "return cache[st…