Skip to content

Commit

Permalink
Addressed three review comments.
Browse files Browse the repository at this point in the history
Use LISTIFY instead of a hand-coded version.  Got rid of SETQ
of a PROG variable, since variables should have been initialized
to NIL by PROG.
  • Loading branch information
eswenson1 committed Jul 26, 2024
1 parent 9fbfd66 commit 74f27de
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 8 deletions.
7 changes: 2 additions & 5 deletions src/shrdlu/blockl.6
Original file line number Diff line number Diff line change
Expand Up @@ -248,16 +248,13 @@

(DEFUN PACKO (OBJ TYPE)
(PROG (XX)
(setq xx nil)
(MAPC (FUNCTION (LAMBDA (X)
(AND (THVAL (QUOTE (THGOAL (!IS $?X
$E
TYPE)))
(LIST (LIST (QUOTE X) X)))
(SETQ XX (PACKORD X (SIZE X) XX)))))
(cond ((atom obj) (list obj))
(t obj))
)
(listify obj))
(RETURN (MAPCAR (QUOTE CADR) XX))))

(DEFUN PACKON
Expand Down Expand Up @@ -348,4 +345,4 @@
(LESSP (OR (END? TIME) 777777)
(GET EV (QUOTE END))))))))



5 changes: 2 additions & 3 deletions src/shrdlu/blockp.5
Original file line number Diff line number Diff line change
Expand Up @@ -496,8 +496,7 @@ THEOREM)
(!STACKUP $?X)
(OR (LESSP (APPLY (QUOTE PLUS)
(MAPCAR (QUOTE (LAMBDA (X) (CADDR (SIZE X))))
(cond ((atom $?x) (list $?x))
(t $?x))))
(listify $?x)))
1201)
(NOT (DPRINT2 (QUOTE TOO/ HIGH/,))))
(THCOND
Expand Down Expand Up @@ -866,4 +865,4 @@ NIL
!UNGRASP))

(QUOTE (PREDICATES ARE: !LOC !SUPPORT !ON !PHYSOB))


2 changes: 2 additions & 0 deletions src/shrdlu/dictio.75
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,8 @@
(RETURN (PROG (CUT NBB BOTH)
(SETQ NBB N)
(AND (FLUSHME)
;ejs
; (** N
(move-ptw N
NW
(EQ (WORD PTW) (CAR A))
Expand Down
3 changes: 3 additions & 0 deletions src/shrdlu/loader.20
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@
;;; NEVER NOTICE)
;;;

;(setsyntax 44. 'single 44.)
(setsyntax 34. 'single 34.)
;(setsyntax 35. 'single 35.)
;(sstatus syntax 35. 1)

(SETQ GC-OVERFLOW '(LAMBDA (X) T))

Expand Down

0 comments on commit 74f27de

Please sign in to comment.