Add block pushing and wireworld simulation.

This commit is contained in:
David Thompson 2024-05-18 14:04:35 -04:00
parent b9f9e81381
commit a34a7e9b7a
12 changed files with 379 additions and 39 deletions

View file

@ -22,7 +22,7 @@
;;; Code:
(define-module (guile list)
#:export (delete delq delq! last-pair))
#:export (delete delq delq!))
(define (fold proc acc lst)
(if (null? lst)
@ -34,11 +34,6 @@
(define (fold-right proc acc lst)
(fold proc acc (reverse lst)))
(define (last-pair lst)
(if (null? (cdr lst))
lst
(last-pair (cdr lst))))
(define (delete item lst . eq-pair)
(define eq (if (pair? eq-pair) (car eq-pair) equal?))
(fold-right (lambda (i acc)