We propose a method for easily developing efficient programs for finding optimal sequences, such as the maximum weighted sequence of a set of feasible ones. We formalize a way to derive efficient algorithms from naive enumerate-and-choose-style ones by shortcut fusion, which is a program transformation for eliminating intermediate data structures passed between functions. In addition, we propose a set of transformations for exploiting our shortcut fusion law. As an implementation of our method, we introduce a library for finding optimal sequences. The library consists of proposed transformations, together with functions useful for describing desirable sequences, so that naive enumerate-and-choose-style programs will be automatically improved.