A study of double-scattering effects in ?d andpd interactions between 15 and 400 GeV