Ljsp
俺Lispã§call/ccãåãããã«ãªã£ãã®ã§ãæcall/ccã使ã£ã¦Gaucheä¸ã§ä½ã£ã俺Prologããã£ã¡ã§åããã¦ã¿ãã repl> (?- (append X Y (a b c)) (write (x = X y = Y)) (fail)) (x = () y = (a b c)) (x = (a) y = (b c)) (x = (a b) y = (c)) (x = (a b c)â¦
俺Lispãå é¨defineã«å¯¾å¿ããã¦ã¿ãã repl> (letrec () (define x 1) (define y 2) (cons x y)) (1 . 2) http://kar.s206.xrea.com/lisp/?e=(letrec%20()%20(define%20x%201)%20(define%20y%202)%20(cons%20x%20y)) 以ä¸ã®ãããªå±éå¦çããã¦ãã (letreâ¦
俺Lispã®unquoteãã対å¿ãã¦ããªãã£ãquasiquoteãunquote-splicingã«ã対å¿ããã¦ã¿ãã and,or,condçã®åºæ¬ãã¯ãã®å®ç¾©ã«ãquasiquoteã使ããããã«ãquasiquoteèªä½ã®å®ç¾©ã«ã¯ãããã¯ä½¿ããã«ä»¥ä¸ã§ä»£ç¨ã (and x y) â (if x y #f)ã§ä»£ç¨ã (or x yâ¦
æä½ã£ã俺Lispã«call/ccã¨æ«å°¾å帰æé©åãå®è£ ãã¦ã¿ãã (call/cc (lambda (c) (list 1 (c 2) 3))) 2 http://kar.s206.xrea.com/lisp/?e=(call%2Fcc%20(lambda%20(c)%20(list%201%20(c%202)%203))) call/ccã®ãã¹ãçµæ (1 2 3)ã®ãªã¹ããä½ãéä¸ã§æãâ¦