home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.lisp.mcl
- Path: sparky!uunet!haven.umd.edu!darwin.sura.net!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!magnus.acs.ohio-state.edu!usenet.ins.cwru.edu!agate!dog.ee.lbl.gov!hellgate.utah.edu!hellgate!moore
- From: moore@cs.utah.edu (Tim Moore)
- Subject: Re: non quoted arguements
- Message-ID: <MOORE.92Dec14100254@defmacro.cs.utah.edu>
- In-reply-to: bright@ENH.NIST.GOV's message of 14 Dec 92 15:24:08 GMT
- Organization: University of Utah CS Dept
- References: <01GSAWG9D45U001D1T@ENH.NIST.GOV>
- Date: 14 Dec 92 10:02:54
- Lines: 21
-
- In article <01GSAWG9D45U001D1T@ENH.NIST.GOV> bright@ENH.NIST.GOV writes:
-
- How does one write a function/macro/anything to return the input, like the
- old nlambdas and fexpers used to do? The reason: I'd like to track what I
- do without having to quote everything. Say, track-it, which returns the
- value of foo, but pushes the symbol foo onto a list:
-
- (setq bar '(a list with data)) (defparameter *all-new-names* '(some old
- names too))
- (track-it bar) --> (a list with data), and *all-new-names* = (bar some
- old names too)
-
- (defmacro track-it (name)
- `(progn
- (pushnew ',name *all-new-names*)
- ,name))
-
- --
- Tim Moore moore@cs.utah.edu {bellcore,hplabs}!utah-cs!moore
- "Wind in my hair - Shifting and drifting - Mechanical music - Adrenaline surge"
- - Rush
-