title: Hide type's nature
body: <p>To learn linked lists' (doubly-linked) conception I'm writing a bunch of simple common functions to handle them. Most of the functions take pointer to the DL_List
  structure, which is the handle and contains not only links to the first and last elements but also current position in the list.</p>
  
  <pre><code>       typedef struct DL_Node {
                 struct DL_Node *next = NULL;
                 struct DL_Node *prev = NULL;
  
                 int data;
         } DL_Node;
  
         typedef struct DL_List {
                 struct DL_Node *first = NULL;
                 struct DL_Node *last  = NULL;
  
                 struct DL_Node *cur   = NULL;
         } DL_List;
  </code></pre>
  
  <p>Therefore I always have to pass a pointer to the handle.</p>
  
  <pre><code>   int main() {...
         DL_List list; // lives on the stack
  
         init_list(&amp;list, 9);
         push(&amp;list, 7);
         append(&amp;list, 10);
         insert_after(&amp;list, -31);
         print_list(&amp;list);
     ...}
  </code></pre>
  
  <p>So here is the question: is there any way to avoid rereading passing <code>&amp;list</code>? Maybe typedefing?</p>
  
  <p><a href="https://github.com/Aenry/DoublyLinkedLists" rel="nofollow">github repo</a></p>