4: Vectors
( \newcommand{\kernel}{\mathrm{null}\,}\)
In the previous chapter we used a loop to compute the elements of a sequence, but we were only able to store the last element. In this chapter, we’ll use a vector to store all of the elements. We’ll also learn how to select elements from a vector, and how to perform vector arithmetic and common vector operations like reduce and apply.