{"id":165448,"date":"2020-10-08T09:11:44","date_gmt":"2020-10-08T01:11:44","guid":{"rendered":"http:\/\/4563.org\/?p=165448"},"modified":"2020-10-08T09:11:44","modified_gmt":"2020-10-08T01:11:44","slug":"%e9%97%ad%e5%8c%85%e4%b8%ba%e4%bb%80%e4%b9%88%e5%8f%ab%e9%97%ad%e5%8c%85","status":"publish","type":"post","link":"http:\/\/4563.org\/?p=165448","title":{"rendered":"\u95ed\u5305\u4e3a\u4ec0\u4e48\u53eb\u95ed\u5305"},"content":{"rendered":"<div>\n<div>\n<div>\n<h1>                  \u95ed\u5305\u4e3a\u4ec0\u4e48\u53eb\u95ed\u5305               <\/h1>\n<p> <\/p>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : zxCoder <\/span>  <span><i><\/i> 4<\/span> <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<\/p><\/div>\n<div isfirst=\"1\"> <\/p>\n<p>\u5b66\u5230\u95ed\u5305\u8fd9\u4e2a\u6982\u5ff5\uff0c\u5c31\u662f\u51fd\u6570\u8fd4\u56de\u4e00\u4e2a\u51fd\u6570\uff0c\u7136\u540e\u53ef\u4ee5\u8bbf\u95ee\u5916\u5c42\u51fd\u6570\u7684\u5c40\u90e8\u53d8\u91cf\uff1f \u8fd9\u4e2a\u6709\u4ec0\u4e48\u7528\u5417\uff1f\u90fd\u662f\u5c40\u90e8\u53d8\u91cf\u4e86\uff0c\u96be\u9053\u4e0d\u5c31\u662f\u4e3a\u4e86\u4e0d\u8ba9\u5916\u9762\u8bbf\u95ee\u7684\u5417\uff1f \u8fd9\u8ddf\u6570\u5b66\u4e0a\u7684\u95ed\u5305\u6709\u4ec0\u4e48\u5173\u7cfb\u5417\uff1f<\/p>\n<\/p><\/div>\n<div> <b>\u5927\u4f6c\u6709\u8a71\u8aaa<\/b> (<span>14<\/span>)        <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<ul>\n<li data-pid=\"3649877\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : Cbdy <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u662f\u7684<br \/>\u6709\u4e00\u4e9b\u7528<br \/>\u4e0d\u662f<br \/>\u6ca1\u6709\u5173\u7cfb                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3649878\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : des <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u95ed\u5305\u53c8\u53eb\u8bcd\u6cd5\u95ed\u5305\uff0c\u81f3\u4e8e\u201c\u95ed\u5305\u201d\u8fd9\u4e2a\u8bcd\u662f\u7ffb\u8bd1\u81ea\u82f1\u6587 Closure<br \/>\u7528\u6765\u6307\u4ee3\u67d0\u4e9b\u5176\u5f00\u653e\u7ed1\u5b9a\uff08\u81ea\u7531\u53d8\u91cf\uff09\u5df2\u7ecf\u7531\u5176\u8bed\u6cd5\u73af\u5883\u5b8c\u6210\u95ed\u5408\uff08\u6216\u8005\u7ed1\u5b9a\uff09\u7684 lambda \u8868\u8fbe\u5f0f\uff0c\u4ece\u800c\u5f62\u6210\u4e86\u95ed\u5408\u7684\u8868\u8fbe\u5f0f\uff0c\u6216\u79f0\u95ed\u5305<br \/>https:\/\/zh.wikipedia.org\/wiki\/%E9%97%AD%E5%8C%85_(%E8%AE%A1%E7%AE%97%E6%9C%BA%E7%A7%91%E5%AD%A6)                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3649879\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : des <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @des \u8865\u5145\u4e00\u4e0b\u53c2\u8003\u8d44\u6599\uff0c\u987a\u4fbf\u201c\u95ed\u5305\u201d\u8fd9\u4e2a\u63cf\u8ff0\u5e94\u8be5\u662f\u6e90\u4e8e\u6570\u5b66<\/p>\n<p>https:\/\/www.zhihu.com\/question\/422554486<br \/>https:\/\/www.zhihu.com\/question\/333567126\/answer\/742694242                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3649880\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : geelaw <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             https:\/\/i.loli.net\/2020\/10\/06\/h6lNvGms2EU7DjS.png<\/p>\n<p>\u53e6\u4e00\u4e2a\u7c7b\u6bd4\uff1a\u533f\u540d\u51fd\u6570 = CPU \uff08\u63d0\u4f9b\u903b\u8f91\uff09\uff0c\u533f\u540d\u51fd\u6570\u6240\u6355\u6349\u7684\u53d8\u91cf = \u4e3b\u5b58\u7b49\u5176\u4ed6\u8bbe\u5907\uff08\u63d0\u4f9b\u73af\u5883\uff09\uff0c\u95ed\u5305 = \u53ef\u4ee5\u4f7f\u7528\u7684\u7535\u8111\u3002                                                            <\/p><\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3649881\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : gbin <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u5916\u5c42\u51fd\u6570\u8fd4\u56de\u7684\u51fd\u6570\u8fd0\u884c\u65f6\u4e0d\u786e\u5b9a\uff0c\u95ed\u5305\u662f\u4e3a\u4e86\u5728\u5916\u5c42\u51fd\u6570\u6267\u884c\u5b8c\u6bd5\u540e\u5783\u573e\u56de\u6536\u65f6\u4fdd\u5b58\u8fd4\u56de\u7684\u51fd\u6570\u9700\u8981\u8bfb\u53d6\u7684\u54ea\u4e9b\u5c40\u90e8\u53d8\u91cf\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3649882\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : az467 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u76f4\u63a5\u7684\u5173\u7cfb\u597d\u50cf\u6ca1\u6709\u3002<br \/>\u4e0d\u8fc7\u6211\u89c9\u5f97\u5b58\u5728\u7b2c\u4e09\u4e2a\u8bcd\uff0c\u8fd9\u4e2a\u8bcd\u8ddf\u79bb\u6563\u4e0a\u7684\u95ed\u5305\u8fd8\u6709\u7f16\u7a0b\u4e0a\u7684\u95ed\u5305\u90fd\u6709\u5173\u7cfb\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3649883\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : Sinksky <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u7f16\u7a0b\u4e0a\u7684\u95ed\u5305\u548c\u6570\u5b66\u4e0a\u7684\u95ed\u5305\u6709\u4e9b\u4e0d\u540c\uff0c\u7f16\u7a0b\u4e0a\u7684\u95ed\u5305\u662f\u4fdd\u5b58\u6709\u521b\u5efa\u95ed\u5305\u65f6\u72b6\u6001\u7684\u51fd\u6570(C++\u4e2d\u53eb\u6355\u83b7\u53d8\u91cf)\uff0c\u6570\u5b66\u4e0a\u7684\u95ed\u5305\u8bb2\u7684\u662f\u8fd0\u7b97\u5bf9\u4e8e\u8fd0\u7b97\u57df\u5c01\u95ed\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3649884\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : vvxex <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u95ed\u5305\uff0c\u5c31\u662f\u5e26\u8fd0\u884c\u65f6\u73af\u5883\u7684\u51fd\u6570\u3002over                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3649885\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : codingguy <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             const accessConf = (function generateAccessor() {<br \/> const config = &#8216;\u65e0\u6cd5\u4fee\u6539\u7684\u503c&#8217;;<\/p>\n<p> return () =&gt; {<br \/> return config;<br \/> };<br \/>})();<\/p>\n<p>accessConf(); \/\/ =&gt; &#8216;\u65e0\u6cd5\u4fee\u6539\u7684\u503c&#8217;<\/p>\n<p>\u8fd9\u662f\u4e00\u79cd\u4f7f\u7528\u573a\u666f\u3002\u53ef\u4ee5\u786e\u4fdd config \u53ea\u8bfb\u3002                                                            <\/p><\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3649886\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : zxCoder <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @codingguy \u975e\u6760\uff0c\u4f46\u662f\u8fd9\u6837\u5927\u8d39\u5468\u7ae0\u5c31\u662f\u4e3a\u4e86\u8ba9 config \u53ea\u8bfb\u3002\u3002\u3002 \u662f\u5426\u8fd8\u6709\u66f4\u52a0\u590d\u6742\u7684\u7528\u5904\u5462                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3649887\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : retanoj <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @zxCoder <br \/>\u5bf9\u4e8e js \u800c\u8a00\uff0c\u5728\u6ca1\u6709 class \u7684\u65f6\u5019\uff0c\u8fd8\u60f3\u8981\u5b9e\u73b0\u50cf\u7c7b\u4e00\u6837\u7684\u65b9\u6cd5\u548c\u79c1\u6709\u53d8\u91cf\u7684\u8bdd\uff0c\u662f\u4e0d\u662f\u5c31\u53ef\u4ee5\u7528\u95ed\u5305\uff1f                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3649888\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : 12tall <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u79f0\u4e4b\u4e3a\u9ad8\u9636\u51fd\u6570\u66f4\u5f62\u8c61\u4e00\u4e9b\uff0c\u4e2a\u4eba\u89c9\u5f97\u5728 js \u91cc\u9762\u6700\u76f4\u89c2\u7684\u4f8b\u5b50\u53ef\u4ee5\u901a\u8fc7\u8bbe\u7f6e\u53c2\u6570\u751f\u6210\u4e0d\u540c\u7684\u7ebf\u6027\u63d2\u503c\u51fd\u6570                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3649889\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : wei771783057 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u4e25\u683c\u610f\u4e49\u4e0a\u8bb2\uff0c\u95ed\u5305\u53ea\u6709\u4e00\u6761\u5b9a\u4e49\u5c31\u662f \u51fd\u6570\u5f15\u7528\u4e86\u5916\u90e8\u53d8\u91cf \u3002<br \/>\u6240\u4ee5\u5176\u5b9e\u4f60\u5e73\u5e38\u666e\u901a\u51fd\u6570\u53ea\u8981\u5f15\u7528\u4e86\u5168\u5c40\u53d8\u91cf\u5c31\u5f62\u6210\u95ed\u5305\u4e86\uff0c\u53ea\u4e0d\u8fc7\u8fd9\u662f\u5168\u5c40\u5c42\u9762\u7684\uff0c<br \/>\u800c\u4e00\u822c\u7684\u5f62\u5f0f\u662f 1\uff0c\u4e00\u4e2a\u5305\u88f9\u51fd\u6570\u5185\u7684\u51fd\u6570\u5f15\u7528\u4e86\u8fd9\u4e2a\u5305\u88f9\u51fd\u6570\u5185\u90e8\u8bcd\u6cd5\u4f5c\u7528\u57df\u5b83\u81ea\u8eab\u5916\u7684\u53d8\u91cf\uff0c\u5982\u679c\u5728\u5305\u88f9\u51fd\u6570\u5185\u8fd9\u4e2a\u51fd\u6570\u76f4\u63a5\u5c31\u8fd0\u884c\u4e86\uff0c\u90a3\u5c31\u662f\u5f62\u6210\u4e86\u8c03\u7528\u6267\u884c\u6808\uff0c\u7136\u540e\u6267\u884c\u5b8c\u7acb\u9a6c\u51fa\u6808 \u7b49\u5783\u573e\u56de\u6536 GC \u540e\u5f15\u7528\u7684\u53d8\u91cf\u5185\u5b58\u5c31\u6e05\u7406\u6389\u4e86\uff0c2\uff0c\u4f46\u6211\u4eec\u4e00\u822c\u72ed\u4e49\u4e0a\u95ed\u5305\u6307\u7684\u662f\u5305\u88f9\u51fd\u6570\u628a\u8fd9\u4e2a\u5185\u90e8\u51fd\u6570\u8fd4\u56de\u8d4b\u7ed9\u5176\u4ed6\u53d8\u91cf\uff0c\u4f46\u7531\u4e8e\u8fd9\u4e2a\u5185\u90e8\u51fd\u6570\u5b83\u5f15\u7528\u4e86\u5305\u88f9\u5185\u5b83\u81ea\u8eab\u5916\u90e8\u4f5c\u7528\u57df\u53d8\u91cf\uff0c\u5bfc\u81f4\u5728\u6267\u884c\u6808\u4f9d\u6b21\u8fdb\u51fa\u540e\uff0c\u88ab\u5f15\u7528\u7684\u5305\u88f9\u5185\u90e8\u53d8\u91cf\u65e0\u6cd5\u88ab GC\uff0c\u8fd9\u5c31\u5f62\u6210\u4e86\u6240\u8c13\u95ed\u5305\u3002<br \/>\u4e00\u822c\u4f5c\u7528 <br \/>1\uff0c\u5f62\u6210\u5185\u90e8\u79c1\u6709\u53d8\u91cf\uff0c\u65e0\u6cd5\u88ab\u76f4\u63a5\u8bbf\u95ee\uff0c\u5fc5\u987b\u901a\u8fc7\u5f15\u7528\u5b83\u7684\u5185\u90e8\u51fd\u6570\u83b7\u53d6\uff0c\u53ef\u4ee5\u8fdb\u884c\u4e00\u7cfb\u5217\u8bfb\u5199\u8bbf\u95ee\u63a7\u5236\u3002<br \/>2\uff0c\u5236\u4f5c\u504f\u51fd\u6570\uff0c\u6bd4\u5982 bind\uff0c\u53ef\u4ee5\u63a5\u53d7\u4e00\u4e9b\u9884\u8bbe\u53c2\u6570\u503c\uff0c\u8fd4\u56de\u4e00\u4e2a\u4f1a\u7528\u5230\u5b83\u4eec\u7684\u51fd\u6570\uff0c\u8fd8\u6709\u7c7b\u4f3c\u7684\u50cf\u67ef\u91cc\u5316\uff0c\u5c06\u4e00\u4e2a\u63a5\u53d7\u591a\u4e2a\u53c2\u6570\u7684\u51fd\u6570\u8f6c\u6362\u6210\u63a5\u53d7\u5355\u4e00\u53c2\u6570\u5e76\u8fd4\u56de\u4e00\u4e2a\u63a5\u6536\u5269\u4f59\u53c2\u6570\u8fd4\u56de\u7ed3\u679c\u7684\u51fd\u6570\u3002<br \/>3\uff0c\u9ad8\u9636\u51fd\u6570\uff0c\u50cf\u7ec4\u5408\u51fd\u6570 compose\uff0c\u628a\u51fd\u6570\u4f5c\u4e3a\u53c2\u6570\u4f20\u5165\uff0c\u5185\u90e8\u5b9e\u73b0\u5176\u8c03\u7528\u5f62\u5f0f\u8fd4\u56de\u7ed3\u679c\uff0c\u8fd8\u6709\u50cf\u5236\u4f5c\u9632\u6296\u8282\u6d41\u51fd\u6570\u4e5f\u90fd\u662f\u95ed\u5305\u7684\u5e94\u7528 \u90fd\u662f\u901a\u8fc7\u9884\u8bbe\u7684\u53c2\u6570\u4f5c\u4e3a\u95ed\u5305\u53d8\u91cf\u8fd4\u56de\u4e00\u4e2a\u5f15\u7528\u5b83\u7684\u51fd\u6570\u6765\u5b9e\u73b0\u7684\u529f\u80fd\u3002<br \/>\u53e6\u5916 class \u7c7b\u79c1\u6709\u5b57\u6bb5\u8fd8\u5728 tc39 \u63d0\u6848\u4e2d\uff0c\u4e0d\u8fc7 class \u8fd8\u662f\u4e0d\u592a\u53d7\u5f85\u89c1\uff0c\u6bd5\u7adf\u53ea\u662f prototype \u7684\u8bed\u6cd5\u7cd6\u800c\u4e14\u5e76\u4e0d\u5b8c\u5907\uff0cjs \u793e\u533a\u611f\u89c9\u8fd8\u662f\u66f4\u504f\u5411 FP \u4e00\u4e9b\uff0c\uff0c\uff0c                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"3649890\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : codingguy <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @zxCoder \u66f4\u590d\u6742\u7684\u7528\u5904\u60f3\u4e0d\u5230\u4e86\uff0c\u6bd4\u5982\u51fd\u6570\u67ef\u91cc\u5316\uff08\u5b9e\u73b0\u770b\u8fd9\u91cc https:\/\/hackernoon.com\/currying-in-js-d9ddc64f162e \uff09\uff1f<br \/>\u57fa\u672c\u90fd\u662f\u7528\u4e86\u53ef\u4ee5\u76f4\u63a5\u8bbf\u95ee\u5916\u5c42\u4ee3\u7801\u5757\u53d8\u91cf\u7684\u8fd9\u4e00\u4fbf\u5229\u3002<br \/>#13 \u603b\u7ed3\u7684\u633a\u597d                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li>\n","protected":false},"excerpt":{"rendered":"<p>\u95ed\u5305\u4e3a\u4ec0\u4e48\u53eb\u95ed\u5305 \u8cc7\u6df1\u5927\u4f6c : z&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[],"tags":[],"_links":{"self":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/165448"}],"collection":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=165448"}],"version-history":[{"count":0,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/165448\/revisions"}],"wp:attachment":[{"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=165448"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=165448"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=165448"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}