;(QUOTE (((SUBST X Y Z) - substitute X for Y in Z) (DESCRIPTION: Generates a copy of Z with every occurence of Y) (replaced by a copy of X. This is a nondestructive version of) (DSUBST.)))
(DEFINE SUBST (X Y Z) (DSUBST X Y (COPY Z)))
(QUOTE ())
;(QUOTE (((REVERSE L) - reverse a list) (DESCRIPTION: Returns a copy of its argument list with) (the elements in the reverse order.)))
(DEFINE REVERSE (L) (DREVERSE (APPEND L ())))
(QUOTE ())
;(QUOTE (((DSUBST X Y Z) - substitute X for Y in Z) (DESCRIPTION: Actually modifies the argument Z, replacing each) (occurence of Y with a copy of X.)))
(DEFINE DSUBST (X Y Z) (COND ((EQUAL Y Z) (COPY X)) ((NULL (LISTP Z)) Z) (T (RPLACA Z (DSUBST X Y (CAR Z))) (DSUBST X Y (CDR Z)) Z)))
(QUOTE ())
;(QUOTE (((CLOSEALL) - close all open files) (DESCRIPTION: Does exactly that.)))
(DEFINE CLOSEALL () (MAPTCONC CLOSE (OPENP)))
(QUOTE ())
;(QUOTE (((PROPERTY FORM) - generate a property macro) (DESCRIPTION: Used to generate property accessing/setting) (macros. See the manual for details.)))
;(QUOTE (((DEFEXP litat) - return a defining expression) (DESCRIPTION: If litat is a MACRO, FUNCTION or VARIABLE,) (DEFEXP returns an expression which, when evaluated, will set) (it back to its current value. E.g. (DEFEXP (QUOTE PP)) returns) ((DEFINE PP (X) (PROGN (PPRIN2 X) (TERPRI)))) (because that is the definition of PP.)))
;(QUOTE (((PRINT@ X Y Z) - print at a particular location) (DESCRIPTION: If (OUTPUT) is CON: PRINT@ does a) ((CURSOR X Y) operation before printing Z.) (If (OUTPUT) is a file, PRINT@ will do a (SFP X) before) (printing Y (Z is assumed not present) .)))
(DEFINE PRINT@ FORM (PROGN (IF (CDR FORM) (IO@ FORM (OUTPUT))) (PRINT (CAR (LAST FORM)))))
(QUOTE ())
;(QUOTE (((READ@ X Y) - read from location) (DESCRIPTION: If (INPUT) is CON:, READ@ does a (CURSOR X Y)) (before reading. If (INPUT) is a file, READ@ does (SFP X)) (before reading.)))
(DEFINE READ@ FORM (PROGN (IF FORM (IO@ FORM (INPUT))) (READ)))
(QUOTE ())
;(QUOTE (((IO@ Form File) - perform setup operation for READ@/PRINT@) (DESCRIPTION: Chooses and performs the CURSOR or SFP operation) (for READ@ and PRINT@. Can be used to implement other @ functions.)))
;(QUOTE (((READLINE) - read 1 line of atoms) (VALUE: A list of atoms) (DESCRIPTION: Reads the rest of the current line buffer and) (% % returns it as a list.)))