锘??xml version="1.0" encoding="utf-8" standalone="yes"?>新67194成人永久网站,91久久久在线,亚洲日本在线观看http://www.shnenglu.com/varg-vikernes/category/17616.htmlzh-cnMon, 22 Aug 2011 04:45:43 GMTMon, 22 Aug 2011 04:45:43 GMT60lisp let,let*http://www.shnenglu.com/varg-vikernes/archive/2011/08/22/154059.html緋背緋背Mon, 22 Aug 2011 03:50:00 GMThttp://www.shnenglu.com/varg-vikernes/archive/2011/08/22/154059.htmlhttp://www.shnenglu.com/varg-vikernes/comments/154059.htmlhttp://www.shnenglu.com/varg-vikernes/archive/2011/08/22/154059.html#Feedback0http://www.shnenglu.com/varg-vikernes/comments/commentRss/154059.htmlhttp://www.shnenglu.com/varg-vikernes/services/trackbacks/154059.html
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"


緋背 2011-08-22 11:50 鍙戣〃璇勮
]]>
lisp loop,dotimes,dolist,dohttp://www.shnenglu.com/varg-vikernes/archive/2011/08/22/154055.html緋背緋背Mon, 22 Aug 2011 03:05:00 GMThttp://www.shnenglu.com/varg-vikernes/archive/2011/08/22/154055.htmlhttp://www.shnenglu.com/varg-vikernes/comments/154055.htmlhttp://www.shnenglu.com/varg-vikernes/archive/2011/08/22/154055.html#Feedback0http://www.shnenglu.com/varg-vikernes/comments/commentRss/154055.htmlhttp://www.shnenglu.com/varg-vikernes/services/trackbacks/154055.html

Simple LOOP loops forever...

? (loop
    (print "Look, I'm looping!"))
"Look, I'm looping!" 
"Look, I'm looping!" 
"Look, I'm looping!" 
"Look, I'm looping!" 
"Look, I'm looping!" 
"Look, I'm looping!" 
"Look, I'm looping!" 
"Look, I'm looping!" 
... and so on, until you interrupt execution... 
Aborted
? 

? (let ((n 0))
    (loop
      (when (> n 10) (return))
      (print n) (prin1 (* n n))
      (incf n)))
0 0
1 1
2 4
3 9
4 16
5 25
6 36
7 49
8 64
9 81
10 100
NIL
?


Use DOTIMES for a counted loop

? (dotimes (n 11)
    (print n) (prin1 (* n n)))
0 0
1 1
2 4
3 9
4 16
5 25
6 36
7 49
8 64
9 81
10 100
NIL
?


Use DOLIST to process elements of a list

? (dolist (item '(1 2 4 5 9 17 25))
    (format t "~&~D is~:[n't~;~] a perfect square.~%" item (integerp (sqrt item))))
1 is a perfect square.
2 isn't a perfect square.
4 is a perfect square.
5 isn't a perfect square.
9 is a perfect square.
17 isn't a perfect square.
25 is a perfect square.
NIL


? (dolist (item `(1 foo "Hello" 79.3 2/3 ,#'abs))
    (format t "~&~S is a ~A~%" item (type-of item)))
1 is a FIXNUM
FOO is a SYMBOL
"Hello" is a (SIMPLE-BASE-STRING 5)
79.3 is a DOUBLE-FLOAT
2/3 is a RATIO
#<Compiled-function ABS #x1E9CC3E> is a FUNCTION
NIL
? 

DO is tricky, but powerful

? (do ((which 1 (1+ which))
       (list '(foo bar baz qux) (rest list)))
      ((null list) 'done)
    (format t "~&Item ~D is ~S.~%" which (first list)))
Item 1 is FOO.
Item 2 is BAR.
Item 3 is BAZ.
Item 4 is QUX.
DONE
? 
(do ((var1 init1 step1)
     (var2 init2 step2)
     ...)
    (end-test result)
  statement1
  ...)

var1       = which
init1      = 1
step1      = (1+ which)
var2       = list
init2      = '(foo bar baz qux)
step2      = (rest list)
end-test   = (null list)
result     = 'done
statement1 = (format t "~&Item ~D is ~S.~%" which (first list))





緋背 2011-08-22 11:05 鍙戣〃璇勮
]]>
lisp find find-if find-if-nothttp://www.shnenglu.com/varg-vikernes/archive/2011/08/19/153887.html緋背緋背Fri, 19 Aug 2011 14:04:00 GMThttp://www.shnenglu.com/varg-vikernes/archive/2011/08/19/153887.htmlhttp://www.shnenglu.com/varg-vikernes/comments/153887.htmlhttp://www.shnenglu.com/varg-vikernes/archive/2011/08/19/153887.html#Feedback0http://www.shnenglu.com/varg-vikernes/comments/commentRss/153887.htmlhttp://www.shnenglu.com/varg-vikernes/services/trackbacks/153887.html

find item sequence &key from-end test test-not start end key => element

find-if predicate sequence &key from-end start end key => element

find-if-not predicate sequence &key from-end start end key => element

Arguments and Values:

item---an object.

sequence---a proper sequence.

predicate---a designator for a function of one argument that returns a generalized boolean.
鎺ュ彈涓涓弬鏁扮殑鍑芥暟錛岃繑鍥瀊oolean

from-end---a generalized boolean. The default is false.
boolean綾誨瀷錛岄粯璁や負false

test---a designator for a function of two arguments that returns a generalized boolean.
鎺ュ彈涓や釜鍙傛暟鐨勫嚱鏁幫紝榪斿洖boolean

test-not---a designator for a function of two arguments that returns a generalized boolean.
鎺ュ彈涓や釜鍙傛暟鐨勫嚱鏁幫紝榪斿洖boolean

startend---bounding index designators of sequence. The defaults for start and end are 0 and nil, respectively.

key---a designator for a function of one argument, or nil.

element---an element of the sequence, or nil.

findfind-if, and find-if-not each search for an element of the sequence bounded by start and end that satisfies the predicate predicate or that satisfies the test test or test-not, as appropriate.

If from-end is true, then the result is the rightmost element that satisfies the test.

If the sequence contains an element that satisfies the test, then the leftmost or rightmost sequence element, depending on from-end, is returned; otherwise nil is returned.


Examples:

Examples:
(find #\d "here are some letters that can be looked at" :test #'char>)
=> #\Space
(find-if #'oddp '(1 2 3 4 5) :end 3 :from-end t) => 3
(find-if-not #'complexp '#(3.5 2 #C(1.0 0.0) #C(0.0 1.0)) :start 2) => NIL


緋背 2011-08-19 22:04 鍙戣〃璇勮
]]>
lisp MAPC, MAPCAR, MAPCAN, MAPL, MAPLIST, MAPCONhttp://www.shnenglu.com/varg-vikernes/archive/2011/08/19/153861.html緋背緋背Fri, 19 Aug 2011 13:44:00 GMThttp://www.shnenglu.com/varg-vikernes/archive/2011/08/19/153861.htmlhttp://www.shnenglu.com/varg-vikernes/comments/153861.htmlhttp://www.shnenglu.com/varg-vikernes/archive/2011/08/19/153861.html#Feedback0http://www.shnenglu.com/varg-vikernes/comments/commentRss/153861.htmlhttp://www.shnenglu.com/varg-vikernes/services/trackbacks/153861.html

mapc function &rest lists+ => list-1

mapcar function &rest lists+ => result-list

mapcan function &rest lists+ => concatenated-results

mapl function &rest lists+ => list-1

maplist function &rest lists+ => result-list

mapcon function &rest lists+ => concatenated-results

mapcar operates on successive elements of the listsfunction is applied to the first element of each list, then to the second element of each list, and so on. The iteration terminates when the shortest list runs out, and excess elements in other lists are ignored. The value returned by mapcar is a list of the results of successive calls to function.

mapcar 棣栧厛灝嗗嚱鏁癮pply鍒版瘡涓垪琛ㄧ殑絎竴涓厓绱狅紝鍐嶅皢鍑芥暟apply鍒版瘡涓垪琛ㄧ殑絎簩涓厓绱犮傘?br />涓鐩村埌鏈鐭殑鍒楄〃鐨勬渶鍚庝竴涓厓绱犮傚墿涓嬬殑鍏冪礌灝嗚蹇界暐銆?br />瀹冪殑緇撴灉鏄繑鍥炲間笉涓簄il鐨勯泦鍚堛?/em>

mapc is like mapcar except that the results of applying function are not accumulated. The list argument is returned.

mapc 鍜?mapcar 綾諱技銆備笉榪囪繑鍥炵殑鏄涓涓垪琛ㄣ?/div>

maplist is like mapcar except that function is applied to successive sublists of the listsfunction is first applied to the lists themselves, and then to the cdr of each list, and then to the cdr of the cdr of each list, and so on.

maplist 鍜?mapcar 綾諱技錛屼笉榪囬鍏堝皢鍑芥暟apply鍒版瘡涓垪琛紝鐒跺悗灝嗗嚱鏁癮pply鍒版瘡涓垪琛ㄧ殑cdr錛岀劧鍚庡皢鍑芥暟apply鍒版瘡涓垪琛ㄧ殑cddr銆傘?br />鐩村埌鏈鐭殑涓涓垪琛ㄤ負絀轟負姝€?/div>

mapl is like maplist except that the results of applying function are not accumulated; list-1 is returned.

mapl鍜宮aplist綾諱技錛屼絾鏄繑鍥炵殑鏄涓涓垪琛ㄣ?/div>

mapcan and mapcon are like mapcar and maplist respectively, except that the results of applying function are combined into a list by the use of nconc rather than list. That is,

mapcan 鍜?mapcon 綾諱技浜?mapcar 鍜?maplist銆傚畠浠嬌鐢?nconc 榪炴帴緇撴灉鑰屼笉鏄?list銆?br />
Examples
(mapcar #'car '((1 a) (2 b) (3 c))) =>  (1 2 3)   
(mapcar #'abs '(3 -4 2 -5 -6)) => (3 4 2 5 6)
(mapcar #'cons '(a b c) '(1 2 3)) => ((A . 1) (B . 2) (C . 3))

(maplist #'append '(1 2 3 4) '(1 2) '(1 2 3))  =>  ((1 2 3 4 1 2 1 2 3) (2 3 4 2 2 3)) 
(maplist #'(lambda (x) (cons 'foo x)) '(a b c d)) => ((FOO A B C D) (FOO B C D) (FOO C D) (FOO D))
(maplist #'(lambda (x) (if (member (car x) (cdr x)) 0 1)) '(a b a c d b c)) => (0 0 1 0 1 1 1)
(setq dummy nil) =>  NIL   
(mapc #'(lambda (&rest x) (setq dummy (append dummy x)))
'(1 2 3 4)
'(a b c d e)
'(x y z)) => (1 2 3 4)
dummy => (1 A X 2 B Y 3 C Z)

(setq dummy nil) =>  NIL   
(mapl #'(lambda (x) (push x dummy)) '(1 2 3 4)) => (1 2 3 4)
dummy => ((4) (3 4) (2 3 4) (1 2 3 4))

(mapcan #'(lambda (x y) (if (null x) nil (list x y)))
'(nil nil nil d e)
'(1 2 3 4 5 6)) => (D 4 E 5)
(mapcan #'(lambda (x) (and (numberp x) (list x)))
'(a 1 b c 3 4 d 5)) => (1 3 4 5)

(mapcon #'list '(1 2 3 4)) =>  ((1 2 3 4) (2 3 4) (3 4) (4))  



 



緋背 2011-08-19 21:44 鍙戣〃璇勮
]]> 青青草原综合久久大伊人导航_色综合久久天天综合_日日噜噜夜夜狠狠久久丁香五月_热久久这里只有精品
  • <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>
              欧美性开放视频| 精品999在线观看| 亚洲欧美日韩一区二区三区在线观看| 亚洲人在线视频| 欧美激情精品久久久久久| 亚洲毛片网站| 99这里只有久久精品视频| 国产精品成人一区| 久久久久久9999| 久久一区精品| 一区二区三区.www| 午夜精品影院| 亚洲欧洲视频在线| 亚洲午夜国产一区99re久久| 国产日韩三区| 欧美激情一区在线| 国产精品欧美一区二区三区奶水| 久久久久久久网| 欧美区在线播放| 久久精品国产一区二区电影| 看欧美日韩国产| 亚洲一区二区三区在线观看视频 | 91久久国产精品91久久性色| 亚洲经典在线看| 国产亚洲激情在线| 欧美国产日韩在线| 国产精品一区二区男女羞羞无遮挡| 久久久夜夜夜| 欧美天天在线| 欧美二区在线看| 国产欧美精品国产国产专区| 欧美激情精品久久久| 国产精品亚洲综合| 亚洲精品男同| 亚洲高清不卡在线观看| 亚洲色图在线视频| 日韩视频精品在线| 久久精品论坛| 性一交一乱一区二区洋洋av| 欧美激情一区二区在线 | 久久精品一区四区| 欧美日韩亚洲免费| 欧美电影免费观看大全| 国产欧美一区二区精品秋霞影院 | 亚洲欧洲一区二区三区久久| 国产日韩欧美一区二区三区在线观看| 91久久久久久国产精品| 一区二区三区在线观看视频| 亚洲男女毛片无遮挡| 宅男在线国产精品| 欧美高清在线视频观看不卡| 欧美~级网站不卡| 国产一区二区高清| 亚洲欧美中文字幕| 亚洲欧美在线一区二区| 欧美激情精品久久久久久黑人| 久久人91精品久久久久久不卡| 国产精品视频久久久| 一片黄亚洲嫩模| 亚洲午夜日本在线观看| 欧美国产日韩视频| 亚洲国产精品成人精品| 亚洲国产精品久久久久秋霞影院| 欧美一站二站| 久久影院午夜论| 国产专区欧美精品| 久久国产欧美精品| 久久亚洲精品一区| 在线观看一区视频| 久久综合一区| 亚洲人成在线播放网站岛国| 99精品国产热久久91蜜凸| 欧美激情精品久久久久久蜜臀| 亚洲国产日韩综合一区| 999亚洲国产精| 欧美图区在线视频| 亚洲欧美日本日韩| 久久深夜福利免费观看| 1000部精品久久久久久久久| 男女激情久久| 亚洲精品资源美女情侣酒店| 亚洲深夜福利| 国产亚洲精品久久飘花 | 日韩视频免费在线观看| 亚洲天堂av综合网| 国产美女搞久久| 久久久亚洲精品一区二区三区| 欧美大片免费看| 亚洲色图自拍| 国产一区深夜福利| 免费久久99精品国产自在现线| 亚洲精品欧美极品| 欧美一区二区性| 亚洲成人在线网| 欧美日韩国产一区二区三区地区 | 性欧美精品高清| 欧美成人xxx| 亚洲一区二区毛片| 国模精品一区二区三区| 欧美成人第一页| 亚洲午夜一区二区三区| 美女网站久久| 亚洲一区二区欧美| 在线国产欧美| 国产精品久久9| 免费不卡在线观看| 亚洲在线视频| 91久久精品国产91性色tv| 欧美一级免费视频| 亚洲精品影视| 精久久久久久| 国产精品私房写真福利视频| 免费日韩一区二区| 亚洲欧美在线免费| 亚洲精品在线视频观看| 蜜桃av一区二区在线观看| 亚洲欧美日韩国产成人| 91久久国产综合久久蜜月精品 | 一区二区三区在线不卡| 欧美色大人视频| 蜜桃视频一区| 欧美在线观看一区二区| 一级日韩一区在线观看| 欧美激情一区二区三区蜜桃视频 | 亚洲欧洲视频在线| 久久夜色精品| 久久精品国产第一区二区三区| 99在线精品视频| 亚洲欧洲精品成人久久奇米网| 国产亚洲欧洲997久久综合| 国产精品久久久久久久7电影| 欧美超级免费视 在线| 久久免费高清视频| 欧美一区二区三区视频在线| 亚洲视屏在线播放| 亚洲图片你懂的| 一区二区三区欧美在线| 亚洲精品日韩激情在线电影| 亚洲国产电影| 亚洲电影有码| 亚洲电影中文字幕| 亚洲国产精品视频| 欧美高清视频一二三区| 欧美 日韩 国产 一区| 老司机久久99久久精品播放免费 | 久久综合激情| 久久夜色精品国产亚洲aⅴ| 久久成人免费电影| 久久高清福利视频| 久久久久高清| 老司机一区二区| 欧美黄色一区二区| 亚洲国产二区| 99国产精品一区| 中文在线一区| 欧美伊人久久久久久久久影院 | 免费成人av| 欧美不卡在线| 欧美日韩在线播放| 国产精品午夜电影| 狠狠色狠狠色综合日日91app| 一区二区三区在线免费视频| 最新国产成人在线观看| 99精品视频免费观看| 亚洲欧美999| 久久久久久久一区| 亚洲国产高清aⅴ视频| 亚洲裸体在线观看| 午夜精品久久久久久久久久久久| 久久国内精品视频| 欧美高清不卡在线| 国产精品免费在线| 亚洲成色www久久网站| 99精品欧美| 久久国产福利| 亚洲国产一区二区在线| av成人免费| 久久久精品欧美丰满| 欧美国产高清| 国产一区二区电影在线观看 | 国产欧美日韩在线| 亚洲国产高清在线| 亚洲免费视频观看| 欧美mv日韩mv国产网站| 一区二区三区色| 久久亚裔精品欧美| 国产精品推荐精品| 日韩一区二区电影网| 久久久福利视频| 亚洲乱码国产乱码精品精98午夜| 欧美在线播放| 欧美日韩另类国产亚洲欧美一级| 国产亚洲精品资源在线26u| 99re热这里只有精品视频| 久久免费视频在线观看| 亚洲一区二区三区久久| 欧美激情精品久久久久久久变态 | 欧美日韩午夜剧场| 亚洲成色777777在线观看影院| 亚洲影视在线|