mirror of
https://github.com/ashinn/chibi-scheme.git
synced 2025-05-19 13:49:17 +02:00
Patch from Per Bothner for => in non-terminal case clauses.
This commit is contained in:
parent
f56c89fbc1
commit
d0360178f1
1 changed files with 9 additions and 0 deletions
|
@ -117,6 +117,15 @@
|
|||
((w y) 'semivowel)
|
||||
(else => (lambda (x) x))))
|
||||
|
||||
(test '((other . z) (semivowel . y) (other . x)
|
||||
(semivowel . w) (vowel . u))
|
||||
(map (lambda (x)
|
||||
(case x
|
||||
((a e i o u) => (lambda (w) (cons 'vowel w)))
|
||||
((w y) (cons 'semivowel x))
|
||||
(else => (lambda (w) (cons 'other w)))))
|
||||
'(z y x w u)))
|
||||
|
||||
(test #t (and (= 2 2) (> 2 1)))
|
||||
(test #f (and (= 2 2) (< 2 1)))
|
||||
(test '(f g) (and 1 2 'c '(f g)))
|
||||
|
|
Loading…
Add table
Reference in a new issue