eigenmath/cons.cpp

16 lines
237 B
C++
Raw Permalink Normal View History

2004-07-16 19:32:57 +02:00
// Cons two things on the stack.
#include "stdafx.h"
#include "defs.h"
void
cons(void)
{
2005-06-30 02:56:12 +02:00
U *p; // auto var ok, no garbage collection is done here
2004-07-16 19:32:57 +02:00
p = alloc();
p->k = CONS;
p->u.cons.cdr = pop();
p->u.cons.car = pop();
push(p);
}