<kbd id="afajh"><form id="afajh"></form></kbd>
<strong id="afajh"><dl id="afajh"></dl></strong>
    <del id="afajh"><form id="afajh"></form></del>
        1. <th id="afajh"><progress id="afajh"></progress></th>
          <b id="afajh"><abbr id="afajh"></abbr></b>
          <th id="afajh"><progress id="afajh"></progress></th>

          Egison模式匹配編程語言

          聯(lián)合創(chuàng)作 · 2023-09-27 23:40

          Egison 是世界上首個(gè)實(shí)現(xiàn)了非線性模式匹配的編程語言,用于處理各種不自由的數(shù)據(jù)類型。如列表、多集合、集合、樹和圖。

          示例代碼:

          ;; Extract all twin primes from the infinite list of prime numbers with pattern-matching!
          (define $twin-primes
            (match-all primes (list integer)
              [<join _ <cons $p <cons ,(+ p 2) _>>>
               [p (+ p 2)]]))
          
          ;; Enumerate first 10 twin primes
          (take 10 twin-primes)
          ;=>{[3 5] [5 7] [11 13] [17 19] [29 31] [41 43] [59 61] [71 73] [101 103] [107 109]}
          瀏覽 23
          點(diǎn)贊
          評(píng)論
          收藏
          分享

          手機(jī)掃一掃分享

          編輯 分享
          舉報(bào)
          評(píng)論
          圖片
          表情
          推薦
          點(diǎn)贊
          評(píng)論
          收藏
          分享

          手機(jī)掃一掃分享

          編輯 分享
          舉報(bào)
          <kbd id="afajh"><form id="afajh"></form></kbd>
          <strong id="afajh"><dl id="afajh"></dl></strong>
            <del id="afajh"><form id="afajh"></form></del>
                1. <th id="afajh"><progress id="afajh"></progress></th>
                  <b id="afajh"><abbr id="afajh"></abbr></b>
                  <th id="afajh"><progress id="afajh"></progress></th>
                  在线播放高清无码 | 日韩一级欧美 | 99热视| 围内精品久久久久久久久久98 | 影音先锋一区二区三区视频特色 |