#ifndef CAST_TYPE #define CAST_TYPE List_linked #endif typedef struct link *link_t; struct link { link_t nextLink; }; @interface List { @public link_t firstLink; } @end @interface ListIndex_linked { @public List *collection; link_t link; } @end @interface List_linked: List @end @implementation List @end @implementation ListIndex_linked - next { if (link->nextLink != ((CAST_TYPE *) collection)->firstLink) { } } @end int main (int argc, const char **argv) {}