Use CountChange defined in "Wellin - Essential of Programming" Page 117?

Why does my function CountChange not work the same way, Wellin says it does on page 117 of his book Essential of Programming…?

CountChange is CountChange[coins_Llist] := Total[coins /. {p -> .01, n -> .05, d -> .10, q -> .25}]
CountChange[{p, q, q, d, d, p, q, q, d, d}]

Why do I not receive output of “1.42”. Please see attach

Paged 117 Essentials Wellin.nb (77.1 KB)

His In[1] on page 116 is

coins={p,p,q,n,d,d,p,q,q,p}

Compare with your In[1].

The function should be defined as:

CountCoins[coins_List] (*you have defined the pattern _Head wrongly. First letter of the "list" should be capital*)