Thank you to anyone who has already donated - your generous donations helped make three months of treatment possible.
My brother Nate continues to fight stage IV Hodgkin's lymphoma. He's just 31, with a wife and baby girl. They have no active income (since he's been unable to return to work), no insurance, and cannot afford the treatment he needs. Nate and his family need your help. Please consider a donation, every dollar helps. Thanks.
[TestMethod] { this.Evaluate("(define list x x)"); this.Evaluate("(define definem (mlambda x (list 'define (first x) (cons 'mlambda (rest x)))))"); this.Evaluate("(definem cond lst (if (nil? lst) nil (list 'if (first (first lst)) (cons 'do (rest (first lst))) (cons 'cond (rest lst)))))"); this.Evaluate("(define atom? (x) (cond ((nil? x) t) ((list? x) nil) (t t)))"); this.Evaluate("(define append (x y) (if (nil? x) y (cons (first x) (append (rest x) y)))"); this.Evaluate("(definem and lst (if (nil? lst) t (list 'cond (list (first lst) (cons 'and (rest lst))) '(t nil))))"); this.Evaluate("(definem backquote (lst) (cond " + "((nil? lst) nil) " + "((atom? lst) (list 'quote lst)) " + "((equal? (first lst) 'unquote) (first (rest lst))) " + "((and (list? (first lst)) (equal? (first (first lst)) 'unquote-slice)) (list 'append (first (rest (first lst))) (list 'backquote (rest lst)))) " + "(t (list 'cons (list 'backquote (first lst)) (list 'backquote (rest lst)))) " + "))"); this.EvaluateAndCompare("(backquote (a b c))", "(a b c)"); this.EvaluateAndCompare("(backquote (a (b c) d))", "(a (b c) d)"); this.Evaluate("(define x '(b b))"); this.EvaluateAndCompare("(backquote (a (unquote x) c))", "(a (b b) c)"); this.EvaluateAndCompare("(backquote (a ((unquote x)) c))", "(a ((b b)) c)"); this.EvaluateAndCompare("(backquote (a (unquote-slice x) c))", "(a b b c)"); this.EvaluateAndCompare("(backquote (a ((unquote-slice x)) c))", "(a (b b) c)"); this.EvaluateAndCompare("(backquote (a (unquote-slice x) (unquote-slice x) c))", "(a b b b b c)"); }