<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>

                ThinkChat2.0新版上線,更智能更精彩,支持會話、畫圖、視頻、閱讀、搜索等,送10W Token,即刻開啟你的AI之旅 廣告
                ### **[下載](https://racket-lang.org/download/)** 一、在Lisp方言Scheme里,給事物命名通過**define**(定義)的方式完成,輸入: ``` >(define size 2) ``` 會導致解釋器將 size 跟 2關聯 ***** ### **二、復合過程** 1.定義一個復合過程 ``` >(define (square x) (* x x)) ``` 這樣我們就有了一個復合過程,名字為**square**(求一個數x的平方) **過程定義**的一般形式為: ``` >(define (<name > <formal parameters>) <body>) ``` 2.使用這個復合過程 ``` >(square 21) 441 ``` 3.定義 x2 + y2 ``` >(+ (square x) (square y)) ``` 4.定義一個過程求兩個數的平方和 ``` >(define (sum-of-squares x y) (+ (square x) (square y))) ``` ***** ### **三、條件表達式** 1.求一數絕對值 ``` >(define (abs x) (cond ((> x 0) x) ((= x 0) x) ((< x 0) - x))) >(define (abd x) (cond ((< x 0) (- x)) (else x))) >(define (abf x) (if (< x 0) (- x) x)) ``` 2.求三個數之間較大兩個數的和 ``` >(define (ac x y z) (cond ((and (> x y) (> y z)) (+ x y)) ((and (> x z) (> z y)) (+ x z)) ((and (> y x) (> x z)) (+ y x)) ((and (> y z) (> z x)) (+ y z)) ((and (> z x) (> x y)) (+ z x)) ((and (> z y) (> y x)) (+ z y)) )) (ac 2 5 3) ``` 3.求冪 b 的n次方 ``` (define (expt b n) (if (= n 0) 1 (* b (expt b (- n 1))))) (expt 3 3) ```
                  <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>

                              哎呀哎呀视频在线观看