luyuhuang.github.io icon indicating copy to clipboard operation
luyuhuang.github.io copied to clipboard

Y-Combinator: 如何在匿名函数中递归调用自身 - Luyu Huang's Tech Blog

Open luyuhuang opened this issue 4 years ago • 0 comments

https://luyuhuang.tech/2020/08/08/y-combinator.html

如何实现一个阶乘函数? 最简单的做法是使用递归:'use strict';function factorial(n) { if (n === 0) { return 1; } else { return n * factorial(n - 1); }}很好. 那么如何...

luyuhuang avatar Aug 08 '20 12:08 luyuhuang