  A framework for Chebyshev spectral collocation methods for the numerical
solution of functional and delay differential equations (FDEs and DDEs) is
described. The framework combines interpolation via the barycentric resampling
matrix with a multidomain approach used to resolve isolated discontinuities
propagated by non-smooth initial data. Geometric convergence is demonstrated
for several examples of linear and nonlinear FDEs and DDEs with various delay
types, including discrete, proportional, continuous, and state-dependent delay.
The framework is a natural extension of standard spectral collocation methods
based on polynomial interpolants and can be readily incorporated into existing
spectral discretisations, such as in Chebfun/Chebop, allowing the automated and
efficient solution of a wide class of nonlinear functional and delay
differential equations.
