@@ -157,28 +157,20 @@ any::~any() {
157 return (*t)(unthunk);
157 return (*t)(unthunk);
160− auto any::call(const any& a) -> any {
161− assert(a.type == Type::EffFunction || a.type == Type::Function);
162− if (a.type == Type::EffFunction) {
165− return (*a.f)(false);
169 auto any::operator()() const -> any {
160 auto any::operator()() const -> any {
170− if (type == Type::EffFunction || type == Type::Function) {
161+ if (type == Type::EffFunction) {
171− return call(*this);
162+ return (*e)();
173− assert(type == Type::Thunk);
174 const any* valuePtr = this;
164 const any* valuePtr = this;
166+ assert(valuePtr->type == Type::Thunk);
176 const any& value = (*valuePtr->t)(unthunk);
167 const any& value = (*valuePtr->t)(unthunk);
177− if (value.type != Type::Thunk) {
168+ if (value.type == Type::EffFunction) {
178− return call(value);
169+ return (*value.e)();
180 valuePtr = &value;
171 valuePtr = &value;
181− } while (true);
172+ } while (valuePtr->type != Type::Unknown);
184 any::operator long() const {
176 any::operator long() const {