separate (Halstead_List)
function Frequency_Of (This_Item : in Item; In_This : in List) return Natural is
    --==============================================================
    -- Returns frequency of an item in a given list. If the item  ==
    -- does not EXIST, ZERO will be returned.                     ==
    --==============================================================

    Current_Pointer : List := In_This;

begin
    -- Frequency_Of

    Find_Item:
        while Current_Pointer /= null loop

            if Is_Equal (Left => Current_Pointer.Location_Of_Item.all,
                         Right => This_Item) then

                return Current_Pointer.Frequency;

            else

                -- advance the current pointer to the next node
                Current_Pointer := Current_Pointer.Next;

            end if;

        end loop Find_Item;

    -- didn't find the item
    return 0;

end Frequency_Of;