1,045
views
0
recommends
+1 Recommend
1 collections
    0
    shares

      Celebrating 65 years of The Computer Journal - free-to-read perspectives - bcs.org/tcj65

      scite_
       
      • Record: found
      • Abstract: found
      • Conference Proceedings: found
      Is Open Access

      The Essence of the ITERATOR Pattern

      proceedings-article
      ,
      Workshop on Mathematically Structured Functional Programming (MSFP 2006) (MSFP)
      Mathematically Structured Functional Programming
      2 July 2006
      Iterator, Traversal, Design Pattern, Map, Fold, Monad, Idiom
      Bookmark

            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 existing 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.

            Content

            Author and article information

            Contributors
            Conference
            July 2006
            July 2006
            : 1-16
            Affiliations
            [0001]Oxford University Computing Laboratory

            Wolfson Building, Parks Road, Oxford OX1 3QD, UK
            Article
            10.14236/ewic/MSFP2006.7
            11f87bf6-a3e1-4338-8a3d-64dfb1238422
            © Jeremy Gibbons et al. Published by BCS Learning and Development Ltd. Workshop on Mathematically Structured Functional Programming (MSFP 2006), Kuressaare, Estonia

            This work is licensed under a Creative Commons Attribution 4.0 Unported License. To view a copy of this license, visit http://creativecommons.org/licenses/by/4.0/

            Workshop on Mathematically Structured Functional Programming (MSFP 2006)
            MSFP
            Kuressaare, Estonia
            2 July 2006
            Electronic Workshops in Computing (eWiC)
            Mathematically Structured Functional Programming
            History
            Product

            1477-9358 BCS Learning & Development

            Self URI (article page): https://www.scienceopen.com/hosted-document?doi=10.14236/ewic/MSFP2006.7
            Self URI (journal page): https://ewic.bcs.org/
            Categories
            Electronic Workshops in Computing

            Applied computer science,Computer science,Security & Cryptology,Graphics & Multimedia design,General computer science,Human-computer-interaction
            Design Pattern,Monad,Iterator,Fold,Traversal,Map,Idiom

            Comments

            Comment on this article