diff --git a/csys/csys.lisp b/csys/csys.lisp index 17ddb62..4c16c27 100644 --- a/csys/csys.lisp +++ b/csys/csys.lisp @@ -74,13 +74,13 @@ (lambda (msg) (funcall (proc scope) msg scope))) (defun std-proc (msg scope &key (default #'remember) params actions) - (destructuring-bind (nmsg nscope) + (util:mv-bind (nmsg &optional (nscope scope)) (handle-action msg scope :default default :actions actions :params params) (forward nmsg (syns nscope)) (update nscope))) (defun eff-proc (msg scope &key params actions) - (destructuring-bind (nmsg nscope) + (util:mv-bind (nmsg &optional (nscope scope)) (handle-action msg scope :default #'no-op :actions actions :params params) (notify nmsg nscope) (update nscope))) @@ -112,9 +112,8 @@ ;;;; predefined neuron actions -(defun no-op (msg scope) - (list msg scope)) +(defun no-op (msg scope) msg) (defun remember (msg scope) (setf (value scope) (shape:data-value msg :value)) - (list msg scope)) + (values msg scope)) diff --git a/csys/environ.lisp b/csys/environ.lisp index ee0f130..885bf5c 100644 --- a/csys/environ.lisp +++ b/csys/environ.lisp @@ -32,12 +32,12 @@ (addr (getf data :addr))) (when addr (register-cell (cells scope) addr (getf data :new))) - (list msg scope))) + msg)) (defun forward (msg scope) (dolist (cell (find-cells (cells scope) (message:addr msg))) (actor:send cell msg)) - (list msg scope)) + msg) ;;;; helpers diff --git a/test/test-csys.lisp b/test/test-csys.lisp index 244fecf..7ad7dd5 100644 --- a/test/test-csys.lisp +++ b/test/test-csys.lisp @@ -36,7 +36,7 @@ (defun proc-env (msg scope) (let ((t:*test-suite* (csys:environ scope))) - (destructuring-bind (nmsg scope) + (util:mv-bind (nmsg &optional (scope scope)) (csys:handle-action msg scope :actions (environ:actions)) (util:lgi nmsg (tc:receiver t:*test-suite*)) (actor:send (core:mailbox (tc:receiver t:*test-suite*)) nmsg))))