[表示 : 全て 最新50 1-99 101- 201- 301- 401- 501- 601- 701- 801- 901- 2chのread.cgiへ]
Update time : 01/29 10:31 / Filesize : 247 KB / Number-of Response : 980
[このスレッドの書き込みを削除する]
[+板 最近立ったスレ&熱いスレ一覧 : +板 最近立ったスレ/記者別一覧] [類似スレッド一覧]


↑キャッシュ検索、類似スレ動作を修正しました、ご迷惑をお掛けしました

Lisp Scheme Part22



1 名前:デフォルトの名無しさん mailto:sage [2008/05/21(水) 23:58:40 ]
□過去スレ□
Part21: ttp://pc11.2ch.net/test/read.html/tech/1207300697/
Part20: ttp://pc11.2ch.net/test/read.cgi/tech/1205021786/
Part19: ttp://pc11.2ch.net/test/read.cgi/tech/1200237296/
Part18: ttp://pc11.2ch.net/test/read.cgi/tech/1186922295/
Part17: ttp://pc11.2ch.net/test/read.cgi/tech/1177065699/
Part16: ttp://pc11.2ch.net/test/read.cgi/tech/1172404795/
Part15: ttp://pc10.2ch.net/test/read.cgi/tech/1151025773/
Part14: ttp://pc8.2ch.net/test/read.cgi/tech/1132275726/
Part13: ttp://pc8.2ch.net/test/read.cgi/tech/1115901841/
Part12: ttp://pc8.2ch.net/test/read.cgi/tech/1100229366/
Part11: ttp://pc5.2ch.net/test/read.cgi/tech/1091456033/
Part10: ttp://pc5.2ch.net/test/read.cgi/tech/1075630259/
Part9: ttp://pc2.2ch.net/test/read.cgi/tech/1069594582/
Part8: ttp://pc5.2ch.net/tech/kako/1058/10582/1058263391.html
Part7: ttp://pc5.2ch.net/tech/kako/1042/10421/1042167213.html
Part6: ttp://pc3.2ch.net/tech/kako/1031/10315/1031560687.html
Part5: ttp://pc3.2ch.net/tech/kako/1023/10230/1023091882.html
Part4: ttp://pc.2ch.net/tech/kako/1016/10162/1016211619.html
Part3: ttp://pc.2ch.net/tech/kako/1008/10082/1008220265.html
Part2: ttp://pc.2ch.net/tech/kako/1002/10025/1002584344.html
Part1: ttp://piza2.2ch.net/tech/kako/987/987169286.html

342 名前:デフォルトの名無しさん mailto:sage [2008/06/06(金) 21:23:17 ]
(define-syntax swap
(syntax-rules ()
((swap a b) (let ((tmp b))
(set! b a)
(set! a tmp)))))

(define-syntax display-line
(syntax-rules ()
((display-line x)
(begin
(display x)
(newline)))))


(define tmp 5)
(define other 6)

(swap tmp other)

(display-line tmp)
(display-line other)

343 名前:デフォルトの名無しさん mailto:sage [2008/06/06(金) 21:35:26 ]
(define-syntax rotate
(syntax-rules ()
((rotate a) (void))
((rotate a b c ...) (begin
(swap a b)
(rotate b c ...)))))

(define x 1)
(define y 2)
(define z 3)
(define w 4)

(rotate x y z w)

(display-line x)
(display-line y)
(display-line z)
(display-line w)

344 名前:デフォルトの名無しさん mailto:sage [2008/06/06(金) 21:37:26 ]
(define-syntax rotate2
(syntax-rules ()
((rotate2 a c ...)
(shift-to (c ... a) (a c ...)))))

(define-syntax shift-to
(syntax-rules ()
((shift-to (from0 from ...) (to0 to ...))
(let ((tmp from0))
(set! to from) ...
(set! to0 tmp)) )))


(rotate2 x y z w)

345 名前:デフォルトの名無しさん mailto:sage [2008/06/06(金) 23:00:40 ]
(require (lib "time.ss" "srfi/19"))

(date->string (current-date) "~Y/~m/~d(~a) ~H:~M:~S")






[ 続きを読む ] / [ 携帯版 ]

前100 次100 最新50 [ このスレをブックマーク! 携帯に送る ] 2chのread.cgiへ
[+板 最近立ったスレ&熱いスレ一覧 : +板 最近立ったスレ/記者別一覧]( ´∀`)<247KB

read.cgi ver5.27 [feat.BBS2 +1.6] / e.0.2 (02/09/03) / eucaly.net products.
担当:undef