Index: libcfa/src/containers/list.hfa
===================================================================
--- libcfa/src/containers/list.hfa	(revision 70ac8d0fbe40bd7d5685450882da3c93ffb7a479)
+++ libcfa/src/containers/list.hfa	(revision f2d05e9b3873fb71d089e6414ca68bce6b074bba)
@@ -301,4 +301,41 @@
 		$prev_link(list_pos) = (Telem*) 0p;
 	}
+
+	static inline bool ?`is_empty(dlist(Tnode, Telem) &list) {
+		assert( &list != 0p );
+		$dlinks(Telem) *listLinks = & list.$links;
+		if (listLinks->next.is_terminator) {
+			assert(listLinks->prev.is_terminator);
+			assert(listLinks->next.terminator);
+			assert(listLinks->prev.terminator);
+			return true;
+		} else {
+			assert(!listLinks->prev.is_terminator);
+			assert(listLinks->next.elem);
+			assert(listLinks->prev.elem);
+			return false;
+		}
+	}
+
+	static inline Telem & pop_first(dlist(Tnode, Telem) &list) {
+		assert( &list != 0p );
+		assert( !list`is_empty );
+		$dlinks(Telem) *listLinks = & list.$links;
+		Telem & first = *listLinks->next.elem;
+		Tnode & list_pos_first  = $tempcv_e2n( first );
+		remove(list_pos_first);
+		return first;
+	}
+
+	static inline Telem & pop_last(dlist(Tnode, Telem) &list) {
+		assert( &list != 0p );
+		assert( !list`is_empty );
+		$dlinks(Telem) *listLinks = & list.$links;
+		Telem & last = *listLinks->prev.elem;
+		Tnode & list_pos_last  = $tempcv_e2n( last );
+		remove(list_pos_last);
+		return last;
+	}
+
 }
 
