上一页 1 ··· 167 168 169 170 171 172 173 174 175 ··· 491 下一页
摘要: Buffers give you chance to gather values together until your ready to work with them. This pattern can be used for calculations, string manipulations, 阅读全文
posted @ 2020-10-25 22:10 Zhentiw 阅读(103) 评论(0) 推荐(0)
摘要: In our previous code, we have seen this partten for operators: // #region operators const concat = curry((broadcaster, listener) => { let string = ''; 阅读全文
posted @ 2020-10-25 21:54 Zhentiw 阅读(162) 评论(0) 推荐(0)
摘要: If you can think ahead to how you want your code to look into the future, then you can tackle your problems from the inside out. You design how you wa 阅读全文
posted @ 2020-10-25 21:18 Zhentiw 阅读(92) 评论(0) 推荐(0)
摘要: import { curry } from 'ramda'; // #region listeners const _log = (value) => console.log(value); // #endregion // #region broadcasters const done = Sym 阅读全文
posted @ 2020-10-25 17:45 Zhentiw 阅读(124) 评论(0) 推荐(0)
摘要: All good things come to an end. The concept of "done" plays a large part in our pattern and asynchronous code in general. We have to be able to handle 阅读全文
posted @ 2020-10-24 19:39 Zhentiw 阅读(117) 评论(0) 推荐(0)
摘要: The patterns we've established can also work well with plain old Objects and Arrays. We just have to capture the behavior of accessing those values in 阅读全文
posted @ 2020-10-24 15:49 Zhentiw 阅读(85) 评论(0) 推荐(0)
摘要: Functions returning functions returning functions can begin to look a bit unwieldy. The arrow function has helped the syntax a lot, but maybe using a 阅读全文
posted @ 2020-10-24 15:43 Zhentiw 阅读(121) 评论(0) 推荐(0)
摘要: Functions returning functions returning functions can begin to look a bit unwieldy. The arrow function has helped the syntax a lot, but maybe using a 阅读全文
posted @ 2020-10-24 15:35 Zhentiw 阅读(144) 评论(0) 推荐(0)
摘要: Remeber: each broadcast return a cancel function let createTimeout = (time) => (listener) => { let id = setTimeout(listener, time) return () => { clea 阅读全文
posted @ 2020-10-24 15:29 Zhentiw 阅读(161) 评论(0) 推荐(0)
摘要: We should always ship fast experiences to our users, but sometimes something slips through our PR review process and our users start having a slow exp 阅读全文
posted @ 2020-10-23 02:43 Zhentiw 阅读(119) 评论(0) 推荐(0)
上一页 1 ··· 167 168 169 170 171 172 173 174 175 ··· 491 下一页