set-content: transparent update of content field of actor:message

This commit is contained in:
Helmut Merz 2025-06-06 09:14:37 +02:00
parent e0877cc20f
commit 5872c25129

View file

@ -6,7 +6,7 @@
(:shape :scopes/shape)
(:util :scopes/util))
(:export #:start #:stop #:create #:send
#:message #:content #:customer
#:message #:content #:customer #:set-content
#:*logger* #:*root*
#:echo #:inc #:lgi
#:calculator #:plus #:minus #:show #:send-value))
@ -31,6 +31,11 @@
(defun message (content &optional customer)
(make-instance 'message :content content :customer customer))
(defgeneric set-content (msg fn)
(:method (msg fn) (funcall fn msg))
(:method ((msg message) fn)
(message (funcall fn (content msg)) (customer msg))))
;;;; actor loop (listener)
(eval-when (:compile-toplevel :load-toplevel :execute)