yamada_ryuu.kiss = function(who) { if(who.isMajo) this.nouryo = who.nouryo; if(this.nouryo) this.nouryo(who); }
(define (yamada) (list "yamada" nouryoku)) (define (is-yamada? yamada) (if (= (car yamada) "yamada") yamada nil)) (define (majo) (list "majo" nouryoku)) (define (is-majo? majo) (if (= (car majo) "majo") majo nil)) (define (copy yamada majo) (if (is-yamada? yamada) (if (is-majo? majo) (define (car (cdr (yamada))) (car (cdr (majo))))))) (define (kiss someone the-other) (cond ((and (is-yamada? someone) (is-majo? the-other)) (begin (copy someone the-other) (car (cdr someone) the-other))) ((and (is-majo? someone) (is-yamada? the-other)) (begin (copy the-other someone) (car (cdr the-other) someone))) ((and (or (is-yamada? someone) (is-majo? someone)) (or (= nil (is-yamada? the-other)) (= nil (is-majo? the-other)))) (car (cdr someone) the-other)) ((and (or (is-yamada? the-other) (is-majo? the-other)) (or (= nil (is-yamada? someone)) (= nil (is-majo? someone)))) (car (cdr the-other) someone))))
fantasy 说: 你要的迭代: (define (yamada) (list "yamada" nouryoku)) (define (is-yamada? yamada) &nb...
DanoR 说: 都把人家的js迭成别的语言了 话说这lisp吗?几乎看不懂
不知道对不对。
话说这lisp吗?几乎看不懂