[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
SFAs are almost as much fun as HUNKs!
- To: (BUG LISP) at MIT-MC
- Subject: SFAs are almost as much fun as HUNKs!
- From: ALAN at MIT-MC (Alan Bawden)
- Date: Sat, 29 Mar 80 19:57:00 GMT
- Original-date: 29 MAR 1980 1457-EST
In a bare lisp 1914 the following dialog took place:
;;;An SFA that simply passes its output on to someone else:
(defun foo-function (foo op arg)
(caseq op
(tyo ((lambda (f)
(cond ((or (< arg 0) (> arg 177))
(tyo 133 f) ;strange negative numbers are printed
(prin1 arg f) ;enclosed in square brackets.
(tyo 135 f))
(t (tyo arg f))))
(sfa-get foo 0)))
(which-operations '(tyo))))
FOO-FUNCTION
;;;Make one:
(setq foo (sfa-create 'foo-function '1 '|Foo|))
#SFA-|Foo|-70740
;;;Stuff it with someone to talk to:
(sfa-store foo 0 tyo)
#FILE-OUT-|TTY:* *|-70014
(setq terpri t) ;just to be sure (the default these days)
T
(print '(a b c) foo)
(A B C) ;looks fine
T
(setq terpri nil) ;used to be the default
NIL
(print '(a b c) foo)
[-4]A [-3]B [-4]C) ;well, there are the funny negative numbers
T ;but where is my open paren??
;;;If I remove the code to print the square bracketed negative numbers
;;;then the open parens come back.