File Download
There are no files associated with this item.
Links for fulltext
(May Require Subscription)
- Publisher Website: 10.1017/S0956796809007291
- Scopus: eid_2-s2.0-67749111903
- WOS: WOS:000267240300006
- Find via
Supplementary
- Citations:
- Appears in Collections:
Article: The essence of the Iterator pattern
Title | The essence of the Iterator pattern |
---|---|
Authors | |
Issue Date | 2009 |
Publisher | Cambridge University Press. The Journal's web site is located at http://journals.cambridge.org/action/displayJournal?jid=JFP |
Citation | Journal Of Functional Programming, 2009, v. 19 n. 3-4, p. 377-402 How to Cite? |
Abstract | The Iterator pattern gives a clean interface for element-by-element access to a collection, independent of the collection's shape. Imperative iterations using the pattern have two simultaneous aspects: mapping and accumulating. Various existing functional models of iteration capture one or other of these aspects, but not both simultaneously. We argue that C. McBride and R. Paterson's applicative functors (Applicative programming with effects, J. Funct. Program., 18 (1): 113, 2008), and in particular the corresponding traverse operator, do exactly this, and therefore capture the essence of the Iterator pattern. Moreover, they do so in a way that nicely supports modular programming. We present some axioms for traversal, discuss modularity concerns and illustrate with a simple example, the wordcount problem. © 2009 Copyright Cambridge University Press. |
Persistent Identifier | http://hdl.handle.net/10722/188519 |
ISSN | 2023 Impact Factor: 1.1 2023 SCImago Journal Rankings: 0.484 |
ISI Accession Number ID | |
References |
DC Field | Value | Language |
---|---|---|
dc.contributor.author | Gibbons, J | en_US |
dc.contributor.author | Oliveira, BCDS | en_US |
dc.date.accessioned | 2013-09-03T04:09:42Z | - |
dc.date.available | 2013-09-03T04:09:42Z | - |
dc.date.issued | 2009 | en_US |
dc.identifier.citation | Journal Of Functional Programming, 2009, v. 19 n. 3-4, p. 377-402 | en_US |
dc.identifier.issn | 0956-7968 | en_US |
dc.identifier.uri | http://hdl.handle.net/10722/188519 | - |
dc.description.abstract | The Iterator pattern gives a clean interface for element-by-element access to a collection, independent of the collection's shape. Imperative iterations using the pattern have two simultaneous aspects: mapping and accumulating. Various existing functional models of iteration capture one or other of these aspects, but not both simultaneously. We argue that C. McBride and R. Paterson's applicative functors (Applicative programming with effects, J. Funct. Program., 18 (1): 113, 2008), and in particular the corresponding traverse operator, do exactly this, and therefore capture the essence of the Iterator pattern. Moreover, they do so in a way that nicely supports modular programming. We present some axioms for traversal, discuss modularity concerns and illustrate with a simple example, the wordcount problem. © 2009 Copyright Cambridge University Press. | en_US |
dc.language | eng | en_US |
dc.publisher | Cambridge University Press. The Journal's web site is located at http://journals.cambridge.org/action/displayJournal?jid=JFP | en_US |
dc.relation.ispartof | Journal of Functional Programming | en_US |
dc.title | The essence of the Iterator pattern | en_US |
dc.type | Article | en_US |
dc.identifier.email | Oliveira, BCDS: oliveira@comp.nus.edu.sg | en_US |
dc.identifier.authority | Oliveira, BCDS=rp01786 | en_US |
dc.description.nature | link_to_subscribed_fulltext | en_US |
dc.identifier.doi | 10.1017/S0956796809007291 | en_US |
dc.identifier.scopus | eid_2-s2.0-67749111903 | en_US |
dc.relation.references | http://www.scopus.com/mlt/select.url?eid=2-s2.0-67749111903&selection=ref&src=s&origin=recordpage | en_US |
dc.identifier.volume | 19 | en_US |
dc.identifier.issue | 3-4 | en_US |
dc.identifier.spage | 377 | en_US |
dc.identifier.epage | 402 | en_US |
dc.identifier.isi | WOS:000267240300006 | - |
dc.publisher.place | United Kingdom | en_US |
dc.identifier.scopusauthorid | Gibbons, J=7201472851 | en_US |
dc.identifier.scopusauthorid | Oliveira, BCDS=12239474400 | en_US |
dc.identifier.issnl | 0956-7968 | - |