move recons to utils

This commit is contained in:
2025-10-26 11:37:31 +03:00
committed by Pavel Kulyov
parent 951f96f340
commit b4145255bd
2 changed files with 9 additions and 7 deletions

View File

@@ -36,3 +36,10 @@
(list)
lists)
1))
;;; Reconstruct form
(define (recons old-cons new-car new-cdr)
(if (and (eq? new-car (car old-cons))
(eq? new-cdr (cdr old-cons)))
old-cons
(cons new-car new-cdr)))