MAPEXPR(3)

NAME
mapExpr - applies a procedure to all arguments of an operator expression

SYNOPSYS
#include "logmmm.h"
void mapExpr(func,expr)
void (*func)();
chain_list *expr;

PARAMETERS

func
    function to apply

expr
    expression

DESCRIPTION
mapExpr() applies func() to all the arguments of expr. func() must be a procedure (it returns void) and must have an expression as argument .

EXAMPLE
#include "mutnnn.h"		/* mbk utilities */
#include "logmmm.h"
				/*newDisplayExpr */
void newDisplayExpr(expr)
chain_list *expr;
{
if (ATOM(expr))
   printf(" %s",VALUE_ATOM(expr));
else
   {
   printf("(%s ",operToChar(OPER(expr)));
   mapExpr(newDisplayExpr,expr);
   printf(")");
   }
}

SEE ALSO
log(1), abl(1), mapCarExpr(3), anyExpr(3), everyExpr(3).