home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Simtel MSDOS 1992 June
/
SIMTEL_0692.cdr
/
msdos
/
ddjmag
/
ddj8804.arc
/
AMSTERDA.ARC
/
AMSTERDA.EXM
next >
Wrap
Text File
|
1980-01-01
|
896b
|
28 lines
«PT1»«AL1»«LM5»(defun check-reqs (reqs bindings)
(if (null reqs) ;; all requirements passed--success
T
;; else, check the first
(let* ((req (car reqs))
(binding-stream (deduce-pattern (requirement-pattern req)
bindings))
(result))
;; if it failed, return its failure string
(cond
((empty-stream? binding-stream)
(requirement-failure-string req))
;; else, try all the bindings on the other reqs until success.
;; dostream just iterates over the elements of the stream.
(t
(dostream (binds binding-stream)
(setq result (check-reqs (cdr reqs) binds))
(if (eq result t)
;; the remaining requirements passed--success
(return-from check-reqs t)))
;; No other bindings worked; return the last failure string
result)))))