<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] ## lisp 語言最重要的特征 計算過程的Lisp描述(稱為**過程**)本身又可以作為Lisp的**數據**來表示和操作。 這一事實的重要性在于,現存的許多威力強大的程序設計技術,都依賴于填平在“被動的”數據和“主動的”過程之間的傳統劃分。 ``` ;; D 為數據 ;; D -> 2 (define D (+ 1 1)) ;; (D) 為過程 ;; (D) -> 2 (define (D) (+ 1 1)) ``` ## 程序設計的基本元素 - 基本表達形式 - 用于表示語言所關心的最簡單的個體。 - 組合的方法 - 通過它們可以從較簡單的東西出發構造出復合的元素。 - 抽象的方法 - 通過它們可以為復合對象命名,并將它們當作單元去操作。 ## 示例 ### 實現一個求平方根 <details> <summary>main.rkt</summary> ``` #lang racket (define (abs x) (cond ((< x 0) (- x)) ((= x 0) 0) ((> x 0) x) )) (define (square x) (* x x) ) (define (average x y) (/ (+ x y) 2) ) ;; ;; (improve guess x) (define (improve guess x) (average guess (/ x guess))) ;; (good-enough? 1.41412 2) -> #t (define (good-enough? guess x) (< ( abs (- (square guess) x)) 0.01) ) ;; (try 1 2) -> 1 5/12 (define (try guess x) (if (good-enough? guess x) guess (try (improve guess x) x) ) ) (try 1 2) ``` </details> <br />
                  <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>

                              哎呀哎呀视频在线观看