Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
|
|
@ -0,0 +1,8 @@
|
|||
(define (insert-after a b lst)
|
||||
(if (null? lst)
|
||||
lst ; This should be an error, but we will just return the list untouched
|
||||
(let ((c (car lst))
|
||||
(cs (cdr lst)))
|
||||
(if (equal? a c)
|
||||
(cons a (cons b cs))
|
||||
(cons c (insert-after a b cs))))))
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
(define (insert-after! a b lst)
|
||||
(let ((pos (member a lst)))
|
||||
(if pos
|
||||
(set-cdr! pos (cons b (cdr pos))))))
|
||||
Loading…
Add table
Add a link
Reference in a new issue