jak-project/goal_src/test/test-nested-car-cdr-set.gc
water111 cee6c21603
Add basic features for types and objects (#52)
* started adding simple functions in gcommon

* more tests and features

* more tests, debug windows

* debug prints for windows

* back up some regs for windows

* remove debugging prints
2020-09-19 13:22:14 -04:00

9 lines
321 B
Common Lisp

(let ((my-pair (cons (cons 'a 'b) (cons 'c 'd))))
(set! (car (car my-pair)) 'e)
(set! (car (cdr my-pair)) 'f)
(set! (cdr (car my-pair)) 'g)
(set! (cdr (cdr my-pair)) 'h)
(format #t "~A~A~A~A~%" (car (car my-pair)) (car (cdr my-pair)) (cdr (car my-pair)) (cdr (cdr my-pair)))
(format #t "~A~%" my-pair)
)
0