Add stdlib
This commit is contained in:
parent
83516a0948
commit
8482bd2dae
1 changed files with 30 additions and 0 deletions
30
lib/lists.scm
Normal file
30
lib/lists.scm
Normal file
|
@ -0,0 +1,30 @@
|
||||||
|
(define (caar x) (car (car x)))
|
||||||
|
(define (cadr x) (car (cdr x)))
|
||||||
|
(define (cdar x) (cdr (car x)))
|
||||||
|
(define (cddr x) (cdr (cdr x)))
|
||||||
|
|
||||||
|
(define (caaar x) (car (car (car x))))
|
||||||
|
(define (caadr x) (car (car (cdr x))))
|
||||||
|
(define (cadar x) (car (cdr (car x))))
|
||||||
|
(define (caddr x) (car (cdr (cdr x))))
|
||||||
|
(define (cdaar x) (cdr (car (car x))))
|
||||||
|
(define (cdadr x) (cdr (car (cdr x))))
|
||||||
|
(define (cddar x) (cdr (cdr (car x))))
|
||||||
|
(define (cdddr x) (cdr (cdr (cdr x))))
|
||||||
|
|
||||||
|
(define (caaaar x) (car (car (car (car x)))))
|
||||||
|
(define (caaadr x) (car (car (car (cdr x)))))
|
||||||
|
(define (caadar x) (car (car (cdr (car x)))))
|
||||||
|
(define (caaddr x) (car (car (cdr (cdr x)))))
|
||||||
|
(define (cadaar x) (car (cdr (car (car x)))))
|
||||||
|
(define (cadadr x) (car (cdr (car (cdr x)))))
|
||||||
|
(define (caddar x) (car (cdr (cdr (car x)))))
|
||||||
|
(define (cadddr x) (car (cdr (cdr (cdr x)))))
|
||||||
|
(define (cdaaar x) (cdr (car (car (car x)))))
|
||||||
|
(define (cdaadr x) (cdr (car (car (cdr x)))))
|
||||||
|
(define (cdadar x) (cdr (car (cdr (car x)))))
|
||||||
|
(define (cdaddr x) (cdr (car (cdr (cdr x)))))
|
||||||
|
(define (cddaar x) (cdr (cdr (car (car x)))))
|
||||||
|
(define (cddadr x) (cdr (cdr (car (cdr x)))))
|
||||||
|
(define (cdddar x) (cdr (cdr (cdr (car x)))))
|
||||||
|
(define (cddddr x) (cdr (cdr (cdr (cdr x)))))
|
Loading…
Reference in a new issue