mirror of
https://github.com/ashinn/chibi-scheme.git
synced 2025-05-18 21:29:19 +02:00
fix not+and combo (issue #701)
This commit is contained in:
parent
24b1e5024c
commit
24d1f6a8a5
2 changed files with 2 additions and 1 deletions
|
@ -34,6 +34,7 @@
|
|||
(test "or unbalanced" 1 (match 1 ((or (and 1 x) (and 2 y)) x)))
|
||||
(test "not" 'ok (match 28 ((not (a . b)) 'ok)))
|
||||
(test "not fail" 'bad (match 28 ((not a) 'ok) (else 'bad)))
|
||||
(test "not and" #t (match 1 ((and (not 2)) #t)))
|
||||
(test "pred" 'ok (match 28 ((? number?) 'ok)))
|
||||
(test "named pred" 29 (match 28 ((? number? x) (+ x 1))))
|
||||
|
||||
|
|
|
@ -385,7 +385,7 @@
|
|||
((match-two v (or p ...) g+s sk fk i)
|
||||
(match-extract-vars (or p ...) (match-gen-or v (p ...) g+s sk fk i) i ()))
|
||||
((match-two v (not p) g+s (sk ...) fk i)
|
||||
(let ((fk2 (lambda () (sk ...))))
|
||||
(let ((fk2 (lambda () (sk ... i))))
|
||||
(match-one v p g+s (match-drop-ids fk) (fk2) i)))
|
||||
((match-two v (get! getter) (g s) (sk ...) fk i)
|
||||
(let ((getter (lambda () g))) (sk ... i)))
|
||||
|
|
Loading…
Add table
Reference in a new issue