19 lines
548 B
Scheme
19 lines
548 B
Scheme
(define-record-type focus-table :focus-table
|
|
(really-make-focus-table table count)
|
|
focus-table?
|
|
(table focus-table-table)
|
|
(count focus-table-count set-focus-table-count!))
|
|
|
|
(define (make-empty-focus-table)
|
|
(really-make-focus-table (make-integer-table) 0))
|
|
|
|
(define (add-focus-object focus-table object)
|
|
(let ((count (+ 1 (focus-table-count focus-table))))
|
|
(table-set!
|
|
(focus-table-table focus-table) count object)
|
|
count))
|
|
|
|
(define (get-focus-object focus-table index)
|
|
(table-ref (focus-table-table focus-table) index))
|
|
|