scsh-0.5/alt/weak.scm

9 lines
228 B
Scheme

; Copyright (c) 1993, 1994 Richard Kelsey and Jonathan Rees. See file COPYING.
(define (make-weak-pointer x) (cons '<weak> x))
(define weak-pointer-ref cdr)
(define (weak-pointer? x)
(and (pair? x) (eq? (car x) '<weak>)))