How does one define a closure in m4?
"Jack J. Woehr" <[email protected]>
| Newsgroups | gmane.comp.gnu.m4.general |
|---|---|
| Message-ID | <[email protected]> |
How does one define a closure in m4?
define(`a',`$1 $2 and $3')
define(`b', `define(my_$1, `a( $1, `$1' ,`$2')')')
b(c)
my_c(x,y)
==> c c and
What is wanted is
my_c(x,y)
to expand to
==> c x and y
I've tried many tricks and quoting schemes, I'm missing something basic here.
--
Jack J. Woehr # For in the idea of chess and the development
www.well.com/~jax # of the chess mind we have a picture of the
www.softwoehr.com # intellectual struggle of mankind. -- Richard Reti