Plaster
New
List
Login
scheme
default
anonymous
2023.02.11 08:50:32
(define build-constraints (lambda (get-follow-ons) (lambda (x) (let loop ((elements ((build-transitive-closure get-follow-ons) x)) (this-one '()) (result '())) (if (or (null? this-one) (null? (cdr this-one))) (if (null? elements) result (loop (cdr elements) (cons (car elements) (get-follow-ons (car elements))) result)) (loop elements (cdr this-one) (cons (list (car this-one) (cadr this-one)) result)))))))
Raw
Annotate
Repaste
Edit