From 6d74013e3d9a22eda61cefe92c9446443ffa9393 Mon Sep 17 00:00:00 2001 From: "Paul M. Rodriguez" Date: Wed, 6 Nov 2024 17:43:14 -0600 Subject: [PATCH] Allow moving to a parent extent --- defer.lisp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/defer.lisp b/defer.lisp index 76bad3b..316ebed 100644 --- a/defer.lisp +++ b/defer.lisp @@ -127,6 +127,14 @@ Returns the target extent." :on :exit :to extent))))) +(defun move (guard) + (declare (extent-guard guard)) + (match *guarded-extents* + ((list* extent parent-extent _) + (removef (extent-guards extent) guard) + (push guard (extent-guards parent-extent)) + guard) + (otherwise guard))) (comment (lambda ()