MTS 8: LISP and SLIP in MTS
Page Revised February 1979 June 1976
.UP ?
:... (COND ((NULL X) NIL) (T (CONS X X))))
.?
:... (COND ((NULL X) NIL) (T (CONS X X))))
.1 ?
:(COND ((NULL X) NIL) (T (CONS X X)))
.1 UP
:(COND ((NULL X) NIL) (T (CONS X X)))
Command: !0
The !0 command is similar to the UP command, except that it
produces the entire higher-level list, rather than a tail of that
list. In addition, if the current expression is a tail of some
list (in which case the UP command has no effect), the !0 command
specifies the entire list as the new current expression.
Examples:
.?
:(LAMBDA (X) (COND ((NULL X) NIL (T (CONS X X))))
.3 UP ?
| :... (COND ((NULL X) NIL) (T (CONS X X))))
.!0 ?
:(LAMBDA (X) (COND ((NULL X) NIL)(T (CONS X X))))
.3 !0 ?
:(LAMBDA (X) (COND ((NULL X) NIL)(T (CONS X X))))
Command: 0
The 0 (zero) command has an effect somewhere between UP and !0.
Since its precise effect defies description, its use is not
recommended.
Commands: NX, BK
The NX command specifies the next element to the right of the
current expression as the new current expression. It is equivalent
to the command sequence UP 2. The BK command is the inverse of NX;
it specifies, as the current expression, the next element to the
left.
Examples:
.?
:(LAMBDA (X) (COND ((NULL X) NIL) (T (CONS X X))))
.1 ?
:LAMBDA
.NX ?
:(X)
.NX ?
:(COND ((NULL X) NIL) (T (CONS X X)))
92 The LISP Editor

MTS 8: LISP and SLIP in MTS
June 1976 Page Revised February 1979
.1 ?
:COND
.NX ?
:((NULL X) NIL)
.NX ?
(T (CONS X X))
.BK ?
:((NULL X) NIL)
.BK ?
:COND
Command: !NX
The NX command fails if the current expression is the last element
of a list. The !NX command is similar to the NX command, but it
moves to a higher level if necessary to reach an element which is
not the last in a list.
Example:
.?
| :(LAMBDA (X) (COND ((NULL X) NIL) (T (CONS X X))))
.3 2 1 ?
:(NULL X)
.NX ?
:NIL
.NX ?
:YOU’RE AT THE END
.!NX ?
:(T (CONS X X))
Command: #
The # command specifies the original argument to EDIT as the new
current expression.
Command: ¬P
The ¬P command restores the current expression to what it was at
the next-to-last P command. It is useful for switching back and
forth between two expressions.
Example:
.P
:(LAMBDA (X) (COND & &))
.F NULL P ¬P
:(NULL X)
:(LAMBDA (X) (COND & &))
The LISP Editor 93
Previous Page Next Page