ABSTRACT

However, if we are only interested in finding the first place where a value occurs, then accumulation would be overkill (less efficient). Suppose a list T contains numbers and the problem is to find the first location, if any, where a value between 2 and 7 occurs. The findval(T) function shown here can search for the value.