cons_cell_ptr_t list_next(cons_cell_ptr_t list, const std::string& msg) { object_ptr_t cdr = list->cdr(); if(cdr->is_cons_cell()) { cons_cell_ptr_t cell = boost::dynamic_pointer_cast<cons_cell>(cdr); return cell; } else if(cdr == nil()) return cons_cell_ptr_t(); else signal(global_env()->get_symbol("invalid-type-argument"), msg); assert(false); }
void del_global(const string& key) { global_env()->local_frame_.erase(key); }
void set_global(const string& key, T val) { global_env()->local_frame_[key] = val; }
T& get_global(const string& key) { return (*global_env())[key]; }
bool has_global(const string& key) { return global_env()->has(key); }
void Environment<T>::del_global(const std::string& key) { global_env()->local_frame_.erase(key); }
void Environment<T>::set_global(const std::string& key, T val) { global_env()->local_frame_[key] = val; }
T& Environment<T>::get_global(const std::string& key) { return (*global_env())[key]; }
bool Environment<T>::has_global(const std::string& key) { return global_env()->has(key); }