I don't see DEFUN in a ~1966 copy of PDP-6 LISP. I do see it in a 1972 Maclisp.
AI memo 116A from 1967 doesn't have DEFUN. (It does have MACRO.)
I don't see DEFUN in a ~1966 copy of PDP-6 LISP. I do see it in a 1972 Maclisp.
AI memo 116A from 1967 doesn't have DEFUN. (It does have MACRO.)
From the MIT AI Lab file .INFO.; LISP ARCHIV for Maclisp updates:
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.
The defun macro is just syntactic sugar for define plus lambda.
InterLisp (1970) doesn't seem to have it either, so your MacLisp example is either the first, or pretty close to being the first.