"Eduardo Cavazos" wrote:
> Well, I messed around with it some more today and now this
> works:
>
> > (infix '( a + sin(b) + cos(c) + tan(d + e) ))

Have you put this revision on the Net?

  What I say  in the following, is on  the premise that your
final goal is to transform  the algorithm into a macro, that
can be  used at expand time  to build a prefix  form from an
"infix" form.

> Of course, you don't want to have to identify every symbol
> that represents  some function that  you'd like to  use in
> 'infix'.  On  the  other  hand,  if  you  say  "treat  all
> non-operator symbols as functions" then how do you specify
> which items are variables?

  I say: If it is in the position of a unary operator, it is
a unary operator.  IMO the  syntax "sin(b)" is ugly, I would
prefer:

| (infix '(a + sin b + cos c + tan (d + e)))

so that one can write also:

| (infix '(a + sin cos tan - (sin - 0.2)))

> It  might also  be nice  to  allow prefix  notation to  be
> sprinkled in randomly. Perhaps another escape notation for
> that? Abuse quasiquote for that feature?

You  can define  a "prefix"  form that  just expands  to its
unchanged arguments.
--
Marco Maggi

Reply via email to