Numerical solution of a class of delay differential and delay partial differential equations via Haar wavelet