eigenmath/cons.cpp

17 lines
259 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)
{
2007-08-18 18:11:21 +02:00
// auto var ok, no opportunity for garbage collection after p = alloc()
U *p;
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);
}