Extremal solutions for a class of functional differential equations