<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                企業??AI智能體構建引擎,智能編排和調試,一鍵部署,支持知識庫和私有化部署方案 廣告
                [TOC] ## 練習 ``` // 練習 1 // ========== // 給定一個 user,使用 safeProp 和 map/join 或 chain 安全地獲取 sreet 的 name var safeProp = _.curry(function (x, o) { return Maybe.of(o[x]); }); var user = { id: 2, name: "albert", address: { street: { number: 22, name: 'Walnut St' } } }; var ex1 = _.compose(chain(safeProp('name')), chain(safeProp('street')), safeProp('address')); // 練習 2 // ========== // 使用 getFile 獲取文件名并刪除目錄,所以返回值僅僅是文件,然后以純的方式打印文件 var getFile = function() { return new IO(function(){ return __filename; }); } var pureLog = function(x) { return new IO(function(){ console.log(x); return 'logged ' + x; }); } var ex2 = _.compose(chain(_.compose(pureLog, _.last, split('/'))), getFile); // 練習 3 // ========== // 使用 getPost() 然后以 post 的 id 調用 getComments() var getPost = function(i) { return new Task(function (rej, res) { setTimeout(function () { res({ id: i, title: 'Love them tasks' }); }, 300); }); } var getComments = function(i) { return new Task(function (rej, res) { setTimeout(function () { res([ {post_id: i, body: "This book should be illegal"}, {post_id: i, body: "Monads are like smelly shallots"} ]); }, 300); }); } var ex3 = _.compose(chain(_.compose(getComments, _.prop('id'))), getPost); ```
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看