This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
TypeScript 17 mins ████████░░░░░░░░░░░░░ 38.7% | |
Other 10 mins ████▊░░░░░░░░░░░░░░░░ 22.7% | |
Markdown 6 mins ███░░░░░░░░░░░░░░░░░░ 14.7% | |
TSConfig 5 mins ██▋░░░░░░░░░░░░░░░░░░ 13.0% | |
JSON 4 mins █▉░░░░░░░░░░░░░░░░░░░ 9.4% |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Simple | |
const simpleRecursive = () => simpleRecursive() | |
simpleRecursive() | |
// "simpleRecursive" is undefined! (static check) | |
const notSoSimpleRecursive = me => me(me) | |
notSoSimpleRecursive(notSoSimpleRecursive) | |
// Don't run forever! | |
const factorial = (me, n) => n < 1 ? 1 : n * me(me, n - 1) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 刚刚说的感觉很有意思 | |
// 我做了个Demo2333 | |
// 不过只能弄很简单的Function( 可见Functional是未来( 误) | |
const testFunction = num => num * 2 | |
const slowFunction = time => { | |
const now = Date.now() | |
let round = 0 | |
while (now + time > Date.now()) { | |
round++ |