Add tags

Add tags to the following comment
以下のサイトが分かりやすかったです。
結果的に#5733さんのコードそのままになりました。
1
2
3
4
5
6
Y = function(f)
  g = function(proc) return f(function(arg) return proc(proc)(arg) end) end
  return g(g)
end

print(Y(function(f) return function(n) if n < 2 then return 1 else return n * f(n - 1) end end end)(10))

Add tags

The input will be splited to tags with space.

Index

Feed

Other

Link

Pathtraq

loading...