In order to remove the loop, you have to add a variable, so that real-time updated list length. :)------ list.h ------struct ilist_node;struct ilist_type; // add a new structtypedef struct ilist_type ilist;ilist icons(int, ilist);int ifirst(ilist);ilist irest(ilist);ilist iempty();int iempty_huh(ilist);void idelete(ilist); int ilength(ilist);------ list.c ------#include "ilist.h"#include // The ilist ADT is a pointer to this secret structstruct ilist_node { struct ilist_node * rest; int first;};struct ilist_type { struct ilist_node inode; int length; // update it when add new nodes or delete them.}// all the "ilist->" need to be changed into "ilist.inode->"......int ilength(ilist il){return il.length;}