• <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 糯米 閱讀(809) 評論(1)  編輯 收藏 引用 所屬分類: Lisp

            評論

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

            寫的很詳細,有點理解了。原來 let* 會把上一個表達式的計算結果帶到下一個計算結果上面去:)
            2015-10-24 19:58 | creamidea
            久久精品人人槡人妻人人玩AV | 久久久久亚洲AV成人网人人软件| 狠狠色丁香久久婷婷综合五月 | 欧洲性大片xxxxx久久久| 久久精品国产黑森林| 久久午夜无码鲁丝片秋霞| 久久妇女高潮几次MBA| 色综合久久久久| 久久久久精品国产亚洲AV无码| 久久精品中文字幕无码绿巨人| 97久久精品人人澡人人爽| 国内精品伊人久久久影院| 久久久久综合网久久| 一级做a爰片久久毛片免费陪| 国产成人精品免费久久久久| 色综合久久天天综线观看| 久久精品国产亚洲精品2020| 色综合久久天天综线观看| 久久不射电影网| 久久亚洲精品成人AV| 久久香蕉国产线看观看猫咪?v| 色偷偷88888欧美精品久久久| 久久国产午夜精品一区二区三区| 久久亚洲精精品中文字幕| 日韩精品久久久久久久电影| 精品视频久久久久| 国产一久久香蕉国产线看观看| 777午夜精品久久av蜜臀| 久久久99精品成人片中文字幕| 2022年国产精品久久久久| 久久天天躁夜夜躁狠狠躁2022| 日产久久强奸免费的看| 免费一级欧美大片久久网| 精品人妻伦九区久久AAA片69| 777久久精品一区二区三区无码| 国产亚洲精品美女久久久| 久久久久成人精品无码中文字幕 | 久久一本综合| 久久久久国产一级毛片高清板| 色综合久久精品中文字幕首页| 9999国产精品欧美久久久久久 |