skip to main content
research-article

A functional I/O system or, fun for freshman kids

Published:31 August 2009Publication History
Skip Abstract Section

Abstract

Functional programming languages ought to play a central role in mathematics education for middle schools (age range: 10-14). After all, functional programming is a form of algebra and programming is a creative activity about problem solving. Introducing it into mathematics courses would make pre-algebra course come alive. If input and output were invisible, students could implement fun simulations, animations, and even interactive and distributed games all while using nothing more than plain mathematics. We have implemented this vision with a simple framework for purely functional I/O. Using this framework, students design, implement, and test plain mathematical functions over numbers, booleans, string, and images. Then the framework wires them up to devices and performs all the translation from external information to internal data (and vice versa)--just like every other operating system. Once middle school students are hooked on this form of programming, our curriculum provides a smooth path for them from pre-algebra to freshman courses in college on object-oriented design and theorem proving.

Skip Supplemental Material Section

Supplemental Material

afunctionaliosystemorfunforfreshmankidsonvimeo.mp4

mp4

95.2 MB

References

  1. Peter Achten. Teaching functional programming with soccer-fun. In Proc. 2008 International Workshop on Functional and Declarative Programming in Education, pages 61--72, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. Peter Achten and Simon L. Peyton Jones. Porting the Clean object I/O library to Haskell. In IFL '00: Selected Papers from the 12th International Workshop on Implementation of Functional Languages, pages 194--213, London, UK, 2001. Springer-Verlag. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. Peter Achten and Marinus J. Plasmeijer. The ins and outs of Clean I/O. J. Funct. Program., 5 (1): 81--110, 1995.Google ScholarGoogle ScholarCross RefCross Ref
  4. Peter Achten and Martin Wierich. A tutorial to the Clean Object I/O library (version 1.2). Technical report, University of Nijmegen, February 2000.Google ScholarGoogle Scholar
  5. Joe Armstrong, Robert Virding, Claes Wikström, and Mike Williams. Concurrent Programming in Erlang (2nd Edition). Prentice-Hall, 1996. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. Bird and Wadler. Introduction to Functional Programming (2nd Edition). Prentice Hall PTR, 1998. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. Robert S. Boyer and J Strother Moore. Mechanized reasoning about programs and computing machines. In R. Veroff, editor, Automated Reasoning and Its Applications: Essays in Honor of Larry Wos, pages 146--176. The MIT Press, Cambridge, Massachusetts, 1996. URL citeseer.ist.psu.edu/boyer96mechanized.html. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. Kim B. Bruce, Andrea Danyluk, and Thomas P. Murtagh. Event-driven programming is simple enough for cs1. SIGCSE Bull., 33 (3): 1--4, 2001. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. Kim B. Bruce, Andrea Danyluk, and Thomas P. Murtagh. Event-driven programming facilitates learning standard programming concepts. In Object-oriented programming systems, languages, and applications: Educators Symposium, pages 96--100, 2004. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. Manuel Chakravarty and Gabriele Keller. The risks and benefits of teaching purely functional programming in first year. J. Funct. Program., 14 (1): 113--123, 2004. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. Koen Claessen and John Hughes. QuickCheck: a lightweight tool for random testing of Haskell programs. In ACM SIGPLAN International Conference on Functional Programming, pages 268--279, 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. Carl Eastlund. DoubleCheck your theorems. In Proc. 8th Intern. Works. ACL2 and its Applications, pages 41--46. Lulu Press, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. Carl Eastlund and Matthias Felleisen. Automatic verification for interactive graphical programs. In Proc. 8th Intern. Works. ACL2 and its Applications, pages 33--41. Lulu Press, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. Carl Eastlund, Dale Vaillancourt, and Matthias Felleisen. ACL2 for freshmen: First experiences. In Proc. 7th Intern. ACL2 Symposium, pages 200--211. ACM Press, 2007.Google ScholarGoogle Scholar
  15. Conal Elliot and Paul Hudak. Functional reactive animation. In ACM SIGPLAN International Conference on Functional Programming, pages 196--203, 1997. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. Matthias Felleisen, Robert Bruce Findler, Matthew Flatt, and Shriram Krishnamurthi. How to Design Programs. MIT Press, 2001. URL http://www.htdp.org/.Google ScholarGoogle Scholar
  17. Matthias Felleisen, Robert Bruce Findler, Matthew Flatt, and Shriram Krishnamurthi. The TeachScheme! project: Computing and programming for every student. Computer Science Education, 14: 55--77, 2004.Google ScholarGoogle ScholarCross RefCross Ref
  18. Matthias Felleisen, Robert Bruce Findler, Matthew Flatt, and Shriram Krishnamurthi. The structure and interpretation of the computer science curriculum. J. Funct. Program., 14 (4): 365--378, 2004. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. Robert Findler, John Clements, Cormac Flanagan, Matthew Flatt, Shriram Krishnamurthi, Paul Steckler, and Matthias Felleisen. DrScheme: A programming environment for Scheme. J. Funct. Program., 12 (2): 159--182, March 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. Matthew Flatt and Matthias Felleisen. Units: Cool modules for HOT languages. In ACM SIGPLAN Conference on Programming Language Design and Implementation, pages 236--248, June 1998. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. Matthew Flatt, Robert Bruce Findler, and Matthias Felleisen. Scheme with classes, mixins, and traits. In Asian Symposium on Programming Languages and Systems (APLAS) 2006, pages 270--289, November 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. Paul Hudak. The Haskell School of Expression: Learning Functional Programming through Multimedia. Cambridge Univ. Press, 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. Graham Hutton. Programming in Haskell. Cambridge Univ. Press, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. Daniel Ignatoff, Gregory H. Cooper, and Shriram Krishnamurthi. Crossing state lines: Adapting object-oriented frameworks to functional reactive languages. In International Symposium on Functional and Logic Programming, pages 259--276, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. Bryan O'Sullivan, Donald Stewart, and John Goerzen. Real World Haskell. O'Reilly Media, Inc., 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. Kris Powers, Stacey Ecott, and Leanne Hirshfield. Through the looking glass: teaching CS0 with Alice. SIGCSE Bulletin, 39 (1): 213--217, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. Simon Thompson. Haskell: the Craft of Functional Programming. Addison Wesley Longman Publishing Co., Inc., 1997. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. A functional I/O system or, fun for freshman kids

        Recommendations

        Comments

        Login options

        Check if you have access through your login credentials or your institution to get full access on this article.

        Sign in

        Full Access

        • Published in

          cover image ACM SIGPLAN Notices
          ACM SIGPLAN Notices  Volume 44, Issue 9
          ICFP '09
          September 2009
          343 pages
          ISSN:0362-1340
          EISSN:1558-1160
          DOI:10.1145/1631687
          Issue’s Table of Contents
          • cover image ACM Conferences
            ICFP '09: Proceedings of the 14th ACM SIGPLAN international conference on Functional programming
            August 2009
            364 pages
            ISBN:9781605583327
            DOI:10.1145/1596550

          Copyright © 2009 ACM

          Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

          Publisher

          Association for Computing Machinery

          New York, NY, United States

          Publication History

          • Published: 31 August 2009

          Check for updates

          Qualifiers

          • research-article

        PDF Format

        View or Download as a PDF file.

        PDF

        eReader

        View online with eReader.

        eReader