From 6d6d11c849a62b88f3f59d047ae3a9696f59f739 Mon Sep 17 00:00:00 2001 From: Matthew Butterick Date: Mon, 29 Sep 2014 08:30:32 -0700 Subject: [PATCH] tweak --- csp/search.rkt | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/csp/search.rkt b/csp/search.rkt index f8578d02..e709a322 100644 --- a/csp/search.rkt +++ b/csp/search.rkt @@ -69,11 +69,10 @@ (define/public (path) ;; Create a list of nodes from the root to this node. - (let ([parent (get-field parent this)]) - (cons this - (if (not parent) - null - (send parent path))))) + (define parent (get-field parent this)) + (cons this (if (not parent) + null + (send parent path)))) (define/public (expand problem) ;; Return a list of nodes reachable from this node.