- 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")
|

|