• <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无码专区| 国产精品va久久久久久久| 国产精品99久久久精品无码 | 国产精品久久永久免费| A级毛片无码久久精品免费| 亚洲一区精品伊人久久伊人 | 九九热久久免费视频| 精品无码久久久久国产动漫3d| 97久久综合精品久久久综合| 欧美久久亚洲精品| 久久se精品一区二区| 久久无码专区国产精品发布| 亚洲天堂久久精品| 久久99精品久久只有精品| 亚洲美日韩Av中文字幕无码久久久妻妇 | 中文成人久久久久影院免费观看| 久久不见久久见免费视频7| 国内精品久久久久影院老司| 久久精品国产一区二区| 99精品国产在热久久无毒不卡| 77777亚洲午夜久久多喷| 久久久久国产日韩精品网站| 久久久久四虎国产精品| 久久久久人妻一区精品性色av| 久久人人爽人人爽人人片av麻烦| 久久久久这里只有精品| 99久久人人爽亚洲精品美女| 国产V综合V亚洲欧美久久| 久久99热只有频精品8| 欧美午夜精品久久久久免费视 | 岛国搬运www久久| 久久综合综合久久狠狠狠97色88| 国产精品毛片久久久久久久| www.久久热| 曰曰摸天天摸人人看久久久| 99久久精品免费国产大片| 亚洲欧美日韩精品久久| 国产成人无码精品久久久久免费 | 伊人久久大香线蕉精品不卡| 久久久久久噜噜精品免费直播| 久久久久亚洲精品中文字幕|