Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

sexp

Name: Anonymous 2015-03-13 3:34

Is this a sane representation for s-expressions?

struct O
{
union {
Cell *o;
char *a;
};
int type;
};

struct Cell
{
O car, cdr;
};

Name: Anonymous 2015-03-13 14:47

Lisp uses pairs of pointers, not pairs of cons cells.

This isn't valid C89, but I think it's kosher under later, heretical versions.
struct O{
enum type type;
union{
struct{
O *car, *cdr;
}
int i;
double f;
void *o;
}
}

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List