skip to main content
10.1145/1411260.1411272acmconferencesArticle/Chapter ViewAbstractPublication PagesicfpConference Proceedingsconference-collections
research-article

Tips on teaching types and functions

Published: 21 September 2008 Publication History

Abstract

Many beginning students of functional programming have difficulty understanding higher-order functions and their types. Experienced functional programmers have such a close familiarity and intuitive grasp of these crucial concepts that they may find it hard to "bridge the gap," so as to provide their students with a firm understanding of these ideas. I describe a loosely-related cluster of tips and techniques which address the pedagogy of higher-order functions and types, for students with varying degrees of mathematical background and different learning styles - these techniques include tabular presentations, code tools, visual metaphors and an abstract algebra. Although the underlying ideas will be familiar to experts, I believe these presentations can help educators bring important ideas in functional programming to a broader range of students, with less pain and with a deeper understanding.

References

[1]
Patrick Blackburn, Marc Dymetman, Alain Lecomte, Aarne Ranta, Christian Retore, and Eric Villemonte de la Clergerie. Logical Aspects of Computational Linguistics: an Introduction. In Selected papers from the First International Conference on Logical Aspects of Computational Linguistics (LNCS 1328), pages 1--20. Springer-Verlag London, UK. 1996.
[2]
Stanley Burris and Simon Lee. Tarski's High School Identities. The American Mathematical Monthly, Vol. 100, no. 3, pp. 231--236. March, 1993.
[3]
Roberto Di Cosmo. Isomorphisms of types: from lambda calculus to information retrieval and language design. Birkhauser, 1995.
[4]
Roberto Di Cosmo. A short survey of isomorphisms of types. Mathematical Structures in Computer Science, Vol. 15, no. 5, pp. 825--838. Cambridge University Press, New York, NY, USA. 2005.
[5]
Roberto Di Cosmo and Thomas Dufour. The Equational Theory of N, 0, 1, +, times, ↑ Is Decidable, but Not Finitely Axiomatisable. In Logic for Programming, Artificial Intelligence, and Reasoning (LNCS 3452), pages 240--256. Springer-Verlag, Berlin. 2005.
[6]
Dorling Kindersley Books. Silly Sentences (children's game). http://www.dorlingkindersley-uk.co.uk/nf/Book/BookDisplay/0,9780751374278,00.html. DK Games, London, England. 2000.
[7]
Jean-Yves Girard. Proof-nets: the parallel syntax for proof-theory. In Logic and Algebra (LNPAM 180). Marcel Dekker, New York. 1996.
[8]
Isaac Jones. case statements as first order. Haskell prime language proposal ticket, http://hackage.haskell.org/trac/haskell-prime/wiki/LambdaCase. January, 2006.
[9]
Jennifer A. Kaminski, Vladimir M. Sloutsky, and Andrew F. Heckler. Learning Theory: The Advantage of Abstract Examples in Learning Math. Science, Vol. 320, no. 5875, pp. 454--455. April, 2008.
[10]
Joachim Lambek. The mathematics of sentence structure. American Mathematical Monthly, pages 154--170. 1958.
[11]
Harry Mairson. From Hilbert spaces to Dilbert spaces: context semantics made simple. In Foundations of Software Technology and Theoretical Computer Science (LNCS 2556), pages 2--17. Springer-Verlag, 2003.
[12]
Connor McBride. The derivative of a regular type is its type of one-hole contexts. Unpublished manuscript, 2001. Available at http://www.cs.nott.ac.uk/~ctm/diff.pdf.
[13]
Neil Mitchell. Hoogle (web-based Haskell library search engine). Available at http://www-users.cs.york.ac.uk/~ndm/hoogle/.
[14]
Lawrence Moss and Hans-Jorg Tiede. Overview of Categorial Grammar. In Mathematics From Language (course website). http://www.indiana.edu/~mfl/cg.html. Indiana University, 1997.
[15]
Dan Piponi. Algebra, Calculus and Antidiagonal Types. Invited lecture at the workshop on Mathematically Structured Functional Programming, 6-13 July, 2008, Reykjavik University, Iceland. Slides available from http://sigfpe.blogspot.com/2008/07/msfp-2008.html
[16]
Mikael Rittri. Using types as search keys in function libraries. Journal of Functional Programming, Vol. 1, no. 1, pp. 71--89. Cambridge University Press, New York, NY, USA. 1991.
[17]
Fritz Ruehr. "show" for functional types. Email message to the Haskell-Cafe mailing list, http://www.haskell.org/pipermail/haskell-cafe/2006-April/015197.html. April, 2006.
[18]
Satish Thatte. Automated synthesis of interface adapters for reusable classes. In Proceedings of the 21st ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL '94), pages 174--187. ACM, New York, NY, USA. 1994.
[19]
Sam Tobin-Hochstadt and Matthias Felleisen. The Design and Implementation of Typed Scheme. In Proceedings of the 35th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL '08). IEEE, 2001. ACM, New York, NY, USA. 2008.
[20]
David W. Turner. Elementary Strong Functional Programming. In First International Symposium on Functional Programming Languages in Education (LNCS 1022), pp. 1--13. Springer-Verlag, 1996.

Cited By

View all
  • (2024)Assessing the Understanding of Expressions: A Qualitative Study of Notional-Machine-Based Exam QuestionsProceedings of the 24th Koli Calling International Conference on Computing Education Research10.1145/3699538.3699554(1-12)Online publication date: 12-Nov-2024
  • (2015)Understanding beginners' mistakes with HaskellJournal of Functional Programming10.1017/S095679681500017925Online publication date: 6-Aug-2015
  • (2015)Teaching types with a cognitively effective worked example formatJournal of Functional Programming10.1017/S095679681400002125Online publication date: 17-Dec-2015
  • Show More Cited By

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Conferences
FDPE '08: Proceedings of the 2008 international workshop on Functional and declarative programming in education
September 2008
98 pages
ISBN:9781605580685
DOI:10.1145/1411260
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]

Sponsors

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 21 September 2008

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. function types
  2. higher-order functions
  3. pedagogy
  4. power rings
  5. punch-hole diagrams

Qualifiers

  • Research-article

Conference

ICFP08
Sponsor:

Upcoming Conference

ICFP '25
ACM SIGPLAN International Conference on Functional Programming
October 12 - 18, 2025
Singapore , Singapore

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)1
  • Downloads (Last 6 weeks)0
Reflects downloads up to 20 Feb 2025

Other Metrics

Citations

Cited By

View all
  • (2024)Assessing the Understanding of Expressions: A Qualitative Study of Notional-Machine-Based Exam QuestionsProceedings of the 24th Koli Calling International Conference on Computing Education Research10.1145/3699538.3699554(1-12)Online publication date: 12-Nov-2024
  • (2015)Understanding beginners' mistakes with HaskellJournal of Functional Programming10.1017/S095679681500017925Online publication date: 6-Aug-2015
  • (2015)Teaching types with a cognitively effective worked example formatJournal of Functional Programming10.1017/S095679681400002125Online publication date: 17-Dec-2015
  • (2014)Study on difficulties and misconceptions with modern type systemsProceedings of the 2014 conference on Innovation & technology in computer science education10.1145/2591708.2591726(303-308)Online publication date: 21-Jun-2014

View Options

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Figures

Tables

Media

Share

Share

Share this Publication link

Share on social media