10 lines
341 B
Scheme
10 lines
341 B
Scheme
|
(define (make rcs targets . maybe-arg)
|
||
|
(let-optionals maybe-arg ((init-state (list)))
|
||
|
(let* ((rules (rcs->rules rcs))
|
||
|
(rule-set (rules->rule-set rules))
|
||
|
(target-rules (map (lambda (t) (lookup-rule t rules))
|
||
|
targets)))
|
||
|
(map rule-make
|
||
|
target-rules (circular-list init-state)
|
||
|
(circular-list rule-set)))))
|