  We describe a framework for solving a broad class of infinite-dimensional
linear equations, consisting of almost banded operators, which can be used to
resepresent linear ordinary differential equations with general boundary
conditions. The framework contains a data structure on which row operations can
be performed, allowing for the solution of linear equations by the adaptive QR
approach. The algorithm achieves $O(n^{\rm opt})$ complexity, where $n^{\rm
opt}$ is the number of degrees of freedom required to achieve a desired
accuracy, which is determined adaptively. In addition, special tensor product
equations, such as partial differential equations on rectangles, can be solved
by truncating the operator in the $y$-direction with $n_y$ degrees of freedom
and using a generalized Schur decomposition to upper triangularize, before
applying the adaptive QR approach to the $x$-direction, requiring $O(n_y^2
n_x^{\rm opt})$ operations. The framework is implemented in the ApproxFun
package written in the Julia programming language, which achieves highly
competitive computational costs by exploiting unique features of Julia.
