I'm dabbling with Scheme interpreter and ultimately I would need to declare the following types.

--------------

struct Function
{
    Environment env;
    Atom params;
    Atom body_;
}

// An atom is either a string, a double, a symbol, a function or a list of atoms
alias Atom = Algebraic!(string, double, Symbol, Function, This[]);

--------------

These definitions can't work since Function and Atom need each other in this recursive definition.

How to get out of this trap?
Do I have to drop Algebraic and go back to manual tagged unions?

Reply via email to