X-Git-Url: https://jxself.org/git/?p=8sync.git;a=blobdiff_plain;f=8sync%2Frmeta-slot.scm;h=6c4ef6d49b7d21d7a0265c900fb77112a2657765;hp=7a3fe32e00e71ebb806c8f2d4dab5d9a879addfd;hb=8bdfa5c8f81d4e46d57c367da23cd8ea676ad717;hpb=c32aa0d308ce33667168dc2c2f41b30f423fe158 diff --git a/8sync/rmeta-slot.scm b/8sync/rmeta-slot.scm index 7a3fe32..6c4ef6d 100644 --- a/8sync/rmeta-slot.scm +++ b/8sync/rmeta-slot.scm @@ -21,7 +21,8 @@ #:use-module (srfi srfi-9) #:use-module (ice-9 match) - #:export (make-rmeta-slot + #:export (wrap-rmeta-slot + rmeta-slot-table rmeta-slot-cache maybe-build-rmeta-slot-cache! class-rmeta-ref)) @@ -40,8 +41,8 @@ ;;; ;; Define a class with a meta-slot ;;; (define-class () ;;; (entries #:allocation #:each-subclass -;;; #:init-value -;;; (make-rmeta-slot +;;; #:init-thunk +;;; (wrap-rmeta-slot ;;; `((foo . "bar") ;;; (baz . "basil"))))) ;;; @@ -52,8 +53,8 @@ ;;; ;; Define a subclass ;;; (define-class () ;;; (entries #:allocation #:each-subclass -;;; #:init-value -;;; (make-rmeta-slot +;;; #:init-thunk +;;; (wrap-rmeta-slot ;;; `((foo . "foo2") ;;; (peanut . "gallery"))))) ;;; @@ -71,6 +72,11 @@ (define (make-rmeta-slot table) (%make-rmeta-slot table #f)) +(define (wrap-rmeta-slot table) + "In general, using wrap-rmeta-slot in combination with " + (lambda () + (make-rmeta-slot table))) + ;; Immutable and unique (define %the-nothing (cons '*the* '*nothing*))