A technique is described that enables purely functional programmers to write efficient search programs in the same form as
simple and naive but exhaustive search programs. It performs pruning while retaining a simple program form by exploiting a
lazy data structure, an improving sequence, which is a monotonical sequence of approximation values that approach the final value. If some approximation value in an
improving sequence has sufficient information to yield the result of some part of the program, the computations that produce
the values remaining after the approximation can be pruned. On the basis of an exhaustive search program, which can be regarded
as the specification of a problem, three important search algorithms, namely best-first, depth-first branch-and-bound, and
iterative-deepening, can be obtained by using suitable functions defined on improving sequences. Two specific examples, the
eight puzzle problem and the knapsack problem in Haskell, demonstrate that the technique is practical.
Keywords intermediate results - purely functional data structures - improving sequences - lazy evaluation