Re: automatically call functions based on arguments



[snip]

if you really have macros replace 4) with:

4) create a list with the name of the function/macro as an element
5) call EVAL with the list as an argument


Yeah, I hadn't thought about EVAL. So actually call-function can be a
function AND invoke macros. You could even use EVAL to build a lambda
calling your macro, as in (eval '(lambda () (my-macro-call))), and
then compile, cache or do whatewer you want with your lambda.

cheers
AS

.



Relevant Pages

  • Re: What is the main advantage of macros over functions?
    ... if one is allergic to reading Lambda one may better not use ... Lisp authors, doesn't help you much, I'd say. ... >> Readmacros are a completely different mechanism. ... Macros and Readmacros ...
    (comp.lang.lisp)
  • Re: Macros still needed with shorter LAMBDA?
    ... > want to keep typing LAMBDA. ... I also use macros so I do not have to ... I do not mind typing ', but where an embedded language is ... signature (it is an attribute of the Cells engine, ...
    (comp.lang.lisp)
  • Re: What is the main advantage of macros over functions?
    ... In the Lambda Order they are all first-class. ... >> Only advantage of Lisp macros over Lisp functions I see are ... > For me the main advantage with macros is to write less code, ... Readmacros are a completely different mechanism. ...
    (comp.lang.lisp)
  • Re: Macros still needed with shorter LAMBDA?
    ... > I've been thinking about the use of macros in Lisp, ... > want to keep typing LAMBDA. ... Macros abstract over syntax. ... To get a feel for the issue, try writing CASE or COND as an ordinary ...
    (comp.lang.lisp)
  • Re: Macro working on recursive structure expands indefinitely.
    ... > The proxy graphs will be immutable when the program will normally run, ... > they are something like graph pattern. ... So I wanted to build a lambda, ... Macros may be useful for this. ...
    (comp.lang.lisp)