MTS 8: LISP and SLIP in MTS
Page Revised February 1979 June 1976
Command: F s
The F command finds the first occurrence, in print order, of an
element in the current expression which is EQUAL to the
S-expression "s". This element becomes the current expression. If
s is an atom, the F command is implicitly followed by an UP
command.
Examples:
.?
:(LAMBDA (X) (COND ((NULL X) NIL) (T (CONS X X))))
.F X ?
:(X)
.# F NULL ?
:(NULL X)
.# F COND ? F X ?
:(COND ((NULL X) NIL) (T (CONS X X)))
:... X)
.!0 ?
:(NULL X)
.UP UP ? F CONS ?
:... ((NULL X)NIL) (T (CONS X X)))
:(CONS X X)
.# F (NULL X) ?
:(NULL X)
COMMANDS THAT MODIFY THE CURRENT EXPRESSION ___________________________________________
All of these structure-modifying commands require a location specifi-
cation to determine the element(s) to be modified. This location
specification must be a sequence of S-expressions, where each
S-expression is either:
(1) Any command (except F) from the above subsection, or
(2) Anything else, in which case an F command is implied with the
S-expression as argument.
These location specification "commands" are executed in the order
specified, beginning with the current expression, to determine the
expression to be modified. However, the location specification does not
determine a new current expression. A location specification is
indicated in the following subsection by "p1...pn" or "q1...qn".
Since all of the commands in this subsection, except EMBED, are of
variable length, they must be followed by a colon if further commands
are entered on the same line.
94 The LISP Editor