Function llist_inject

Function Documentation

status_t llist_inject(struct llist *list, void (*f)(void *e, void *res), void *result)

Compute a cumulative SOMETHING using all elements in the llist.

Parameters:
  • list – The linked list handle.

  • f – The mapping function, which CAN modify elements.

  • result – The initial result, which is passed to the callback along with each element in the linked list.

Returns:

status_t