The article investigates the mechanisms of selecting and updating representations in declarative and procedural working memory (WM). Declarative WM holds the objects of thought available, whereas procedural WM holds representations of what to do with these objects. Both systems consist of three embedded components: activated long-term memory, a central capacity-limited component for building structures through temporary bindings, and a single-element focus of attention. Five experiments test the hypothesis of analogous mechanisms in declarative and procedural WM, investigating repetition effects across trials for individual representations (objects and responses) and for sets (memory sets and task sets), as well as set-congruency effects. Evidence for analogous processes was obtained from three phenomena: (1) Costs of task switching and of list switching are reduced with longer preparation interval. (2) The effects of task congruency and of list congruency are undiminished with longer preparation interval. (3) Response repetition interacts with task repetition in procedural WM; here we show an analogous interaction of list repetition with item repetition in declarative WM. All three patterns were reproduced by a connectionist model implementing the assumed selection and updating mechanisms. The model consists of two modules, an item-selection module selecting individual items from a memory set, or responses from a task set, and a set-selection module for selecting memory sets or task sets. The model codes the matrix of binding weights in the item-selection module as a pattern of activation in the set-selection module, thereby providing a mechanism for building chunks in LTM, and for unpacking them as structures into working memory.