Most general-purpose GPU programs are built from a few patterns: map, reduce, scan, sort, compact and stencil. This section builds each with Compute and Workgroups's tools, applies them to BookNest's catalog and covers, and checks every result against JavaScript.