• <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>

            糯米

            TI DaVinci, gstreamer, ffmpeg
            隨筆 - 167, 文章 - 0, 評論 - 47, 引用 - 0
            數據加載中……

            lisp let,let*

            let and let* create new variable bindings and execute a series of forms that use these bindings. 
            let performs the bindings in parallel and let* does them sequentially.

            The form

            (let ((var1 init-form-1)
            (var2 init-form-2)
            ...
            (varm init-form-m))
            declaration1
            declaration2
            ...
            declarationp
            form1
            form2
            ...
            formn)

            first evaluates the expressions init-form-1, init-form-2, and so on, in that order, saving the resulting values.
            Then all of the variables varj are bound to the corresponding values;
            each binding is lexical unless there is a special declaration to the contrary.
            The expressions formk are then evaluated in order; the values of all but the last are discarded
            (that is, the body of a let is an implicit progn).
            let* is similar to let, but the bindings of variables are performed sequentially rather than in parallel.
            The expression for the init-form of a var can refer to vars previously bound in the let*.

            The form

            (let* ((var1 init-form-1)
            (var2 init-form-2)
            ...
            (varm init-form-m))
            declaration1
            declaration2
            ...
            declarationp
            form1
            form2
            ...
            formn)
            first evaluates the expression init-form-1, then binds the variable var1 to that value;
            then it evaluates init-form-2 and binds var2, and so on.
            The expressions formj are then evaluated in order;
            the values of all but the last are discarded (that is, the body of let* is an implicit progn).

            For both let and let*, if there is not an init-form associated with a var, var is initialized to nil.

            The special form let has the property that the scope of the name binding does not include any initial value form.
            For let*, a variable's scope also includes the remaining initial value forms for subsequent variable bindings.


            Examples:

            (setq a 'top) => TOP
            (defun dummy-function () a) => DUMMY-FUNCTION
            (let ((a 'inside) (b a))
            (format nil "~S ~S ~S" a b (dummy-function))) => "INSIDE TOP TOP"
            (let* ((a 'inside) (b a))
            (format nil "~S ~S ~S" a b (dummy-function))) => "INSIDE INSIDE TOP"
            (let ((a 'inside) (b a))
            (declare (special a))
            (format nil "~S ~S ~S" a b (dummy-function))) => "INSIDE TOP INSIDE"

            posted on 2011-08-22 11:50 糯米 閱讀(818) 評論(1)  編輯 收藏 引用 所屬分類: Lisp

            評論

            # re: lisp let,let*  回復  更多評論   

            寫的很詳細,有點理解了。原來 let* 會把上一個表達式的計算結果帶到下一個計算結果上面去:)
            2015-10-24 19:58 | creamidea
            国产成人无码精品久久久久免费 | 久久av免费天堂小草播放| 国产精品久久久久9999| 青草久久久国产线免观| 久久99精品久久久久婷婷| 久久中文精品无码中文字幕| 精品久久久久久中文字幕人妻最新| 国产AⅤ精品一区二区三区久久| 久久妇女高潮几次MBA| 久久综合久久综合久久综合| 2021国产精品午夜久久| 99久久精品国产一区二区三区| 狠狠色婷婷久久一区二区 | 国产精品热久久毛片| 国产人久久人人人人爽| 无码任你躁久久久久久老妇| 久久精品国产免费一区| 久久丫精品国产亚洲av| 97久久国产综合精品女不卡| 久久亚洲精品成人无码网站| 亚洲国产精品综合久久网络| 免费观看久久精彩视频| 2021精品国产综合久久| 日韩精品久久无码中文字幕| 精品久久久久久无码不卡| 国产香蕉97碰碰久久人人| 99久久成人18免费网站| 久久精品国产影库免费看| 久久99国产精品久久99果冻传媒| 久久精品99久久香蕉国产色戒| 亚洲人成精品久久久久| 色综合久久综合中文综合网| 久久精品一本到99热免费| 97久久超碰国产精品2021| 国产精品久久久久影院色 | 久久久久人妻一区精品| 精品乱码久久久久久夜夜嗨| 性高湖久久久久久久久AAAAA| 一本色道久久88综合日韩精品 | 亚洲精品乱码久久久久久中文字幕 | 久久香综合精品久久伊人|