File Download

There are no files associated with this item.

  Links for fulltext
     (May Require Subscription)
Supplementary

Article: The essence of the Iterator pattern

TitleThe essence of the Iterator pattern
Authors
Issue Date2009
PublisherCambridge 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?
AbstractThe 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 Identifierhttp://hdl.handle.net/10722/188519
ISSN
2015 Impact Factor: 1.357
2015 SCImago Journal Rankings: 0.917
ISI Accession Number ID
References

 

DC FieldValueLanguage
dc.contributor.authorGibbons, Jen_US
dc.contributor.authorOliveira, BCDSen_US
dc.date.accessioned2013-09-03T04:09:42Z-
dc.date.available2013-09-03T04:09:42Z-
dc.date.issued2009en_US
dc.identifier.citationJournal Of Functional Programming, 2009, v. 19 n. 3-4, p. 377-402en_US
dc.identifier.issn0956-7968en_US
dc.identifier.urihttp://hdl.handle.net/10722/188519-
dc.description.abstractThe 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.languageengen_US
dc.publisherCambridge University Press. The Journal's web site is located at http://journals.cambridge.org/action/displayJournal?jid=JFPen_US
dc.relation.ispartofJournal of Functional Programmingen_US
dc.titleThe essence of the Iterator patternen_US
dc.typeArticleen_US
dc.identifier.emailOliveira, BCDS: oliveira@comp.nus.edu.sgen_US
dc.identifier.authorityOliveira, BCDS=rp01786en_US
dc.description.naturelink_to_subscribed_fulltexten_US
dc.identifier.doi10.1017/S0956796809007291en_US
dc.identifier.scopuseid_2-s2.0-67749111903en_US
dc.relation.referenceshttp://www.scopus.com/mlt/select.url?eid=2-s2.0-67749111903&selection=ref&src=s&origin=recordpageen_US
dc.identifier.volume19en_US
dc.identifier.issue3-4en_US
dc.identifier.spage377en_US
dc.identifier.epage402en_US
dc.identifier.isiWOS:000267240300006-
dc.publisher.placeUnited Kingdomen_US
dc.identifier.scopusauthoridGibbons, J=7201472851en_US
dc.identifier.scopusauthoridOliveira, BCDS=12239474400en_US

Export via OAI-PMH Interface in XML Formats


OR


Export to Other Non-XML Formats