Solving Higher-Order Equations: From Logic to Programming (Progress in Theoretical Computer Science)