support => in cond syntax. close #95

This commit is contained in:
Yuichi Nishiwaki 2014-04-06 11:59:16 +09:00
parent def57348c1
commit 7132c0714e
1 changed files with 10 additions and 3 deletions

View File

@ -81,9 +81,16 @@
#f #f
(if (compare (r 'else) (caar clauses)) (if (compare (r 'else) (caar clauses))
(cons (r 'begin) (cdar clauses)) (cons (r 'begin) (cdar clauses))
(list (r 'if) (caar clauses) (if (if (>= (length (car clauses)) 2)
(cons (r 'begin) (cdar clauses)) (compare (r '=>) (cadar clauses))
(cons (r 'cond) (cdr clauses))))))))) #f)
(list (r 'let) (list (list 'x (caar clauses)))
(list (r 'if) 'x
(list (caddar clauses) 'x)
(cons (r 'cond) (cdr clauses))))
(list (r 'if) (caar clauses)
(cons (r 'begin) (cdar clauses))
(cons (r 'cond) (cdr clauses))))))))))
(define (single? list) (define (single? list)
(if (pair? list) (if (pair? list)