3/1/69 JONL THE CURRENT VERSION OF LISP, "LISP 102", HAS THE FOLLOWING AS-YET UNDOCUMENTED FEATURES: 1)"DEFUN" IS AN FSUBR USED TO DEFINE FUNCTIONS. EXAMPLES ARE (DEFUN ONECONS (X) (CONS 1 X)) WHICH IS EQUIVALENT TO (DEFPROP ONECONS (LAMBDA (X) (CONS 1 X) EXPR) AND (DEFUN SMASH FEXPR (L) (RPLACD L NIL)) IS EQUIVALENT TO (DEFPROP SMASH (LAMBDA (L) (RPLACD L NIL)) FEXPR) THE NOVEL FEATURE OF "DEFUN" IS THAT ONE NEED NOT BE SO CONCERNED WITH BALANCING PARENTHESES AT THE VERY END OF THE FUNCTION DEFINITION, SINCE THE TYPE FLAG MAY BE OMITTED IF IT IS "EXPR", AND APPEARS NEAR THE FRONT OF THE "DEFUN" LIST IF IT IS SOME OTHER. ALSO, THE "LAMBDA" NEED NOT BE DIRECTLY INSERTED. 2)A FAST "DO" SIMILAR TO THE FORTRAN DO FEATURE NOW EXISTS. THE SYNTAX IS (DO ATOM INITIALVALUE STEPFUN ENDTEST STATEMENT1 . . . STATEMENTN) WHERE "ATOM" IS THE INDEX VARIABLE OF THE LOOP, WHICH IS INITIALLY SET TO THE EVALUATION OF "INITIALVALUE", AND IS RESET EACH PASS THROUGH THE LOOP TO THE EVALUATION OF "STEPFUN". "STATEMENT1" TO "STATEMENTN" COMPRISE A REGULAR PROG BODY (EXCEPTING THE LIST OF PROG VARIABLES) WHICH IS EXECUTED REPEATEDLY UNTIL "ENDTEST" EVALUATES TO NON-NIL. FOR EXAMPLE, (DO I 0 (ADD1 I) (EQ I 400) (COND ((NULL (A I)) (GO B))) (PRINT (A I)) B (SETQ TOTAL (PLUS TOTAL (A I)))) ************* THERE ARE TWO OTHER DO FORMATS NOW ALSO ****** 3) A PSEUDO-RANDOM NUMBER GENERATOR CALLED "RANDOM" EXISTS AS A FUNCTION OF NO ARGUMENTS. ITS RANDOMICITY WILL VARY AS TIME GOES BY, AND AS VARIOUS RANDOM ALGORITHMS ARE TRIED OUT. CURRENTLY IT IS SOME RANDOM SHIFT REGISTER SEQUENCE. 4)"CRUNIT" MAY BE USED TO OBTAIN A LIST WHOSE FIRST MEMBER IS THE NAME OF THE MOST RECENTLY SELECTED USER-I/O-DEVICE, AND WHOSE SECOND MEMBER IS THE CURRENT USER SYSTEM NAME. IF THERE ARE ARGUMENTS, THE CURRENT DEVICE IS UPDATED IN EXACTLY THE SAME MANNER AS WITH "UREAD", BUT THE FILE IS NOT OPENED. ONE SHOULD REVIEW PREVIOUS DOCUMENTATION ABOUT OMITTING ARGUMENTS OF UREAD,UWRITE AND UFILE. 5) "GO" AND "RETURN" HAVE BEEN FIXED TO OPERATE IN ACCORD WITH ONE'S INTUITION ABOUT SUCH FUNCTIONS: THEY HAPPEN WHEN EVALUATED BY THE INTERPRETER, AS OPPOSED TO THE PREVIOUS RANDOM IMPLEMENTATION. HENCE THERE SHOULD BE NO DIFFERENCE BETWEEN INTERPRETED CODE AND COMPILED CODE ON THIS MATTER. 6) "LAMBDA" HAS BEEN GENERALIZED SUCH THAT "(LAMBDA (L) E1 E2 . . . EN)" EVALUATES LIKE "(LAMBDA (L) (PROG NIL E1 E2 . . . (RETURN EN))" 7) "ERRSET", WHEN GIVEN A SECOND ARGUMENT, NOW WORKS AS SPECIFIED IN THE LISP 1.5 PROGRAMMERS MANUAL, I.E. ERROR COMMENTS ARE GIVEN ONLY IF THE SECOND ARG EVALUATES TO NON-NIL. WITHOUT THE SECOND ARG, ERROR COMMENTS ARE ALWAYS PRINTED.