/**
* @file array.h
* @author Niki
- * @date 2020 - 2022
+ * @date 2020 - 2025
*
* @brief A simple auto-growing array-list
*
#define array_loop(me, ptr, TYPE) \
for (TYPE *ptr = array_first(me); ptr; ptr = array_next(me, ptr))
+/**
+ * Declare a new <tt>TYPE *</tt> pointer and loop through the array with it
+ * in reverse order (last is index 0).
+ *
+ * How to use:
+ * ```C
+ * array_reloop(me, line, char) {
+ * printf("Item: %s\n", line);
+ * }
+ * ```
+ */
+#define array_deloop(me, ptr, TYPE) \
+ for (TYPE *ptr = array_last(me); ptr; ptr = array_prev(me, ptr))
+
/**
* Similar to <tt>array_loop</tt>, but add a counter <tt>i</tt> starting at 0.
*
size_t i = 0; \
for (TYPE *ptr = array_first(me); ptr; ptr = array_next(me, ptr), i++)
+/**
+ * Similar to <tt>array_deloop</tt>, but add a counter <tt>i</tt> ending at 0.
+ *
+ * @see array_deloop
+ *
+ * How to use:
+ * ```C
+ * array_deloop_i(me, line, char, i) {
+ * printf("Item n°%d: %s\n", i, line);
+ * }
+ * ```
+ *
+ * @note this macro does expand as 2 separate lines, surround with { } if needed
+ */
+#define array_deloop_i(me, ptr, TYPE, i) \
+ size_t i = 0; \
+ for (TYPE *ptr = array_last(me); ptr; ptr = array_prev(me, ptr), i++)
+
/**
* @brief A simple auto-growing array-list
*