-extern void list_foreach(list_t *, list_action_t);
-extern void list_foreach_node(list_t *, list_action_node_t);
+void list_foreach(list_t *, list_action_t);
+void list_foreach_node(list_t *, list_action_node_t);
+
+#define list_each(type, item, list) (type *item = (type *)1; item; item = NULL) for(list_node_t *list_node = (list)->head, *list_next; item = list_node ? list_node->data : NULL, list_next = list_node ? list_node->next : NULL, list_node; list_node = list_next)