Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
9
Task/Y-combinator/Vim-Script/y-combinator-2.vim
Normal file
9
Task/Y-combinator/Vim-Script/y-combinator-2.vim
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
if !has("lambda")
|
||||
echoerr 'Lambda feature required'
|
||||
finish
|
||||
endif
|
||||
let Y = {f -> {x -> x(x)}({y -> f({... -> call(y(y), a:000)})})}
|
||||
let Fac = {f -> {n -> n<2 ? 1 : n * f(n-1)}}
|
||||
|
||||
echo Y(Fac)(5)
|
||||
echo map(range(10), 'Y(Fac)(v:val)')
|
||||
Loading…
Add table
Add a link
Reference in a new issue