IntListAsNum.hs: generalized for use with any integer type. (thanks @darkf)