Index: libcfa/src/containers/list2.hfa
===================================================================
--- libcfa/src/containers/list2.hfa	(revision a5db488e6c0a055c012112dbeeb6ab737d0b9097)
+++ libcfa/src/containers/list2.hfa	(revision 8d1ad36cef9bb7b219f38dfae154e557ae4f238e)
@@ -17,8 +17,4 @@
 
 #include <assert.h>
-
-forall( T & ) struct tag {};
-#define ttag(T) ((tag(T)){})
-#define ztag(n) ttag(Z(n))
 
 extern "C" {
@@ -191,4 +187,10 @@
     }
 
+    static inline bool ?`isEmpty( dlist(tE, tLinks) & lst ) {
+        tE * firstPtr = lst.next;
+        if (ORIGIN_TAG_QUERY((size_t)firstPtr)) firstPtr = 0p;
+        return firstPtr == 0p;
+    }
+
     static inline int ?!=?( const diref(tE, tLinks) & list_pos, zero_t ) {
         tE & list_pos_elem = list_pos;
@@ -229,4 +231,26 @@
     }
 
+    static inline bool ?`hasNext( diref(tE, tLinks) refx ) {
+        return refx`moveNext;
+    }
+
+    static inline bool ?`hasPrev( diref(tE, tLinks) refx ) {
+        return refx`movePrev;
+    }
+
+    static inline diref(tE, tLinks) ?`next( diref(tE, tLinks) refx ) {
+        if( refx`moveNext ) return refx;
+        tE && ref_inner = refx;
+        & ref_inner = 0p;
+        return refx;
+    }
+
+    static inline diref(tE, tLinks) ?`prev( diref(tE, tLinks) refx ) {
+        if( refx`movePrev ) return refx;
+        tE && ref_inner = refx;
+        & ref_inner = 0p;
+        return refx;
+    }
+
     static inline void insert_first( dlist(tE, tLinks) &lst, tE & e ) {
         insert_after(lst`elems, e);
@@ -235,4 +259,18 @@
     static inline void insert_last( dlist(tE, tLinks) &lst, tE & e ) {
         insert_before(lst`elems, e);
+    }
+
+    static inline tE & try_pop_front( dlist(tE, tLinks) &lst ) {
+        diref(tE, tLinks) first_inlist = lst`first;
+        tE & first_item = first_inlist;
+        if (&first_item) remove(first_inlist);
+        return first_item;
+    }
+
+    static inline tE & try_pop_back( dlist(tE, tLinks) &lst ) {
+        diref(tE, tLinks) last_inlist = lst`last;
+        tE & last_item = last_inlist;
+        if (&last_item) remove(last_inlist);
+        return last_item;
     }
 
@@ -297,4 +335,21 @@
         return ref_dird`movePrev;
     }
-
+    static inline bool ?`hasNext( tE & ref ) {
+        diref(tE, tE) ref_dird = { ref };
+        return ref_dird`hasNext;
+    }
+    static inline bool ?`hasPrev( tE & ref ) {
+        diref(tE, tE) ref_dird = { ref };
+        return ref_dird`hasPrev;
+    }
+    static inline tE & ?`next( tE & ref ) {
+        diref(tE, tE) ref_dird = { ref };
+        diref(tE, tE) rslt = ref_dird`next;
+        return rslt;
+    }
+    static inline tE & ?`prev( tE & ref ) {
+        diref(tE, tE) ref_dird = { ref };
+        diref(tE, tE) rslt = ref_dird`prev;
+        return rslt;
+    }
 }
