home search a-z help
University of Cambridge Logic and Semantics Seminar
16 June 2006: Jeremy Gibbons
Computer Laboratory > Research > TSG > Logic and Semantics Seminar > 16 June 2006: Jeremy Gibbons

Speaker: Jeremy Gibbons, Oxford University
Title: The Essence of the Iterator Pattern
Time: 16 June 2006, 2.00pm
Venue: William Gates Building, room FW11
Abstract:

The Iterator pattern gives a clean interface for element-by-element access to a collection. Imperative iterations using the pattern have two simultaneous aspects: mapping and accumulating. Various functional iterations model one or other of these, but not both simultaneously. We argue that McBride and Paterson's idioms, and in particular the corresponding traverse operator, do exactly this, and therefore capture the essence of the Iterator pattern. We present some axioms for traversal, and illustrate with a simple example, the repmin problem.