(loop for wall = (generate-wall walls paths) when (> counter 3) do (return) if (loop named internal-loop ;all paths exist for hex1 in hexes while (loop for hex2 in hexes unless (path-exists-p hex1 hex2 (remove wall paths :test #'connection-equal-p)) do (return-from internal-loop nil) finally (return-from internal-loop t))) (update-with-wall walls paths wall) else (setf counter (1+ counter))) ; caught ERROR: ; during macroexpansion of (LOOP FOR WALL ...). Use *BREAK-ON-SIGNALS* to ; intercept. ; ; (UPDATE-WITH-WALL WALLS PATHS ; WALL) found where keyword expected getting LOOP clause after IF ; current LOOP context: IF (LOOP NAMED INTERNAL-LOOP ; FOR HEX1 IN HEXES ; WHILE (LOOP FOR HEX2 IN HEXES ; UNLESS (PATH-EXISTS-P HEX1 HEX2 ; (REMOVE WALL ; PATHS ; :TEST ; #'CONNECTION-EQUAL-P)) ; DO (RETURN-FROM INTERNAL-LOOP NIL) ; FINALLY (RETURN-FROM INTERNAL-LOOP ; T))) (UPDATE-WITH-WALL ; WALLS PATHS WALL). ; ; compilation unit finished ; caught 1 ERROR condition