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

            評論

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

            寫的很詳細,有點理解了。原來 let* 會把上一個表達式的計算結果帶到下一個計算結果上面去:)
            2015-10-24 19:58 | creamidea
            99热都是精品久久久久久| 久久中文字幕人妻熟av女| 久久99精品国产自在现线小黄鸭| 一本色道久久综合亚洲精品| 久久水蜜桃亚洲av无码精品麻豆| 久久婷婷国产麻豆91天堂| 久久成人精品| 青青草原精品99久久精品66| 久久99精品九九九久久婷婷| 久久久无码精品亚洲日韩蜜臀浪潮 | 久久九色综合九色99伊人| 久久综合久久美利坚合众国| 91精品久久久久久无码| 亚洲精品白浆高清久久久久久 | 999久久久无码国产精品| 国产亚州精品女人久久久久久 | 久久99精品久久久久子伦| 久久久久亚洲AV无码专区网站| 久久夜色精品国产噜噜噜亚洲AV| 国产亚洲精久久久久久无码AV| 国产A级毛片久久久精品毛片| 国产香蕉97碰碰久久人人| 久久男人Av资源网站无码软件 | 久久香蕉国产线看观看99| 久久久久亚洲AV成人网人人网站 | 国内精品伊人久久久影院 | 国产精品内射久久久久欢欢| 亚洲中文字幕无码久久精品1| 日韩电影久久久被窝网| 亚洲国产成人久久精品影视| 久久99精品久久久久久久不卡| 精产国品久久一二三产区区别 | 亚洲欧洲中文日韩久久AV乱码| 亚洲国产精品热久久| 久久夜色精品国产亚洲| 欧美激情精品久久久久| 国产精品久久久久AV福利动漫| 精品一区二区久久| 丁香五月综合久久激情| 久久精品国产精品亚洲下载| 色综合久久天天综线观看|