(define-syntax lazy-cons
(syntax-rules ()
((_ head tail) (cons (delay head) (delay tail)))))
(define (lazy-head ll)
(force (car ll)))
(define (lazy-tail ll)
(force (cdr ll)))
(define-syntax lazy-list
(syntax-rules ()
((_ x) (lazy-cons x '()))
((_ x . xs) (lazy-cons x (lazy-list . xs)))))
;;; ----------------------------------------------------------------
(define ll (lazy-list (print 1) (print 2) (print 3)))
(lazy-head (lazy-tail ll))
KGRlZmluZS1zeW50YXggbGF6eS1jb25zCiAgKHN5bnRheC1ydWxlcyAoKQogICAgKChfIGhlYWQgdGFpbCkgKGNvbnMgKGRlbGF5IGhlYWQpIChkZWxheSB0YWlsKSkpKSkKCihkZWZpbmUgKGxhenktaGVhZCBsbCkKICAoZm9yY2UgKGNhciBsbCkpKQoKKGRlZmluZSAobGF6eS10YWlsIGxsKQogIChmb3JjZSAoY2RyIGxsKSkpCgooZGVmaW5lLXN5bnRheCBsYXp5LWxpc3QKICAoc3ludGF4LXJ1bGVzICgpCiAgICAoKF8geCkgICAgICAobGF6eS1jb25zIHggJygpKSkKICAgICgoXyB4IC4geHMpIChsYXp5LWNvbnMgeCAobGF6eS1saXN0IC4geHMpKSkpKQoKOzs7IC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0KCihkZWZpbmUgbGwgKGxhenktbGlzdCAocHJpbnQgMSkgKHByaW50IDIpIChwcmludCAzKSkpCgoobGF6eS1oZWFkIChsYXp5LXRhaWwgbGwpKQ==