Exact solution to a class of functional difference equations with application to a moving contact line flow