$ meta/guile
GNU Guile 3.0.10.264-b30db2
Copyright (C) 1995-2024 Free Software Foundation, Inc.

Guile comes with ABSOLUTELY NO WARRANTY; for details type `,show w'.
This program is free software, and you are welcome to redistribute it
under certain conditions; type `,show c' for details.

Enter `,help' for help.
scheme@(guile-user)> (define guardian (make-guardian))
(define important (list->bitvector '(1 0 1 1)))
(define ht (make-weak-key-hash-table))
(hashq-set! ht important #t)
$1 = #t
scheme@(guile-user)> (guardian important)
guardian
$2 = #<guardian 7f38c3681fc0 (reachable: 1 unreachable: 0)>
scheme@(guile-user)> (set! important #f)
scheme@(guile-user)> ht
$3 = #<weak-table 1/31>
scheme@(guile-user)> (gc)
scheme@(guile-user)> ht
$4 = #<weak-table 1/31>
scheme@(guile-user)> guardian
$5 = #<guardian 7f38c3681fc0 (reachable: 0 unreachable: 1)>

Generated by apteryx using scpaste at Tue Oct 28 15:09:21 2025. JST. (original)