diff -r 85c08391a090 -r 7aaec630cf15 src/array_list.c --- a/src/array_list.c Thu Nov 17 18:32:59 2022 +0100 +++ b/src/array_list.c Thu Nov 17 18:46:55 2022 +0100 @@ -232,7 +232,16 @@ struct cx_list_s const *list, void const *elem ) { - return 0; + char *cur = ((cx_array_list const *) list)->data; + + for (size_t i = 0; i < list->size; i++) { + if (0 == list->cmpfunc(elem, cur)) { + return i; + } + cur += list->itemsize; + } + + return list->size; } static void cx_arl_sort(struct cx_list_s *list) {