From 8a4ed49fb7625793096842ce2ebe72b64da80f9b Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Mon, 5 Apr 2021 10:27:33 -0700 Subject: add DESC combinator Signed-off-by: Sean Whitton --- src/combinator.lisp | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/combinator.lisp') diff --git a/src/combinator.lisp b/src/combinator.lisp index a133c2b..a67bba8 100644 --- a/src/combinator.lisp +++ b/src/combinator.lisp @@ -149,6 +149,19 @@ apply the elements of REQUIREMENTS in reverse order." :unapply (get psym 'papply) :args args))) +(define-function-property-combinator desc (desc propapp) + (:retprop :type (propapptype propapp) + :desc (lambda () desc) + :hostattrs (lambda (&rest args) + (declare (ignore args)) + (propappattrs propapp)) + :apply (lambda (&rest args) + (declare (ignore args)) + (propappapply propapp)) + :unapply (lambda (&rest args) + (declare (ignore args)) + (propappunapply propapp)))) + (defmacro on-change (propapp &body on-change) "If applying PROPAPP makes a change, also apply each of of the propapps ON-CHANGE in order." -- cgit v1.2.3