Explaining algebraic theory with functional programs
A hierarchy of six important structures from abstract algebra (groups, rings, fields etc.) is introduced as Gofer class definitions and laws about them. Many instance declarations are provided, explaining the algebraic construction of integers, quotients, adding i, function spaces, polynomials, and matrices. The definitions include generalized implementations of polynomial division and matrix inversion. Monadic parsers are provided for all constructs discussed. As an application, a one-line program is given for calculating the eigenvalue equation of a matrix.
KeywordsNatural Number Base Type Functional Programming Functional Programming Language Computer Science Student
Unable to display preview. Download preview PDF.
- [BW88]R. Bird and P. Wadler, Introduction to Functional Programming. Prentice Hall, 1988.Google Scholar
- [Fok92]Jeroen Fokker, Functional programming. Course notes, Department of Computer Science, Utrecht University, 1992. Also available as Functioneel Programmeren and as Programación Funcional. From http://www.cs.ruu.nl/∼jeroen.Google Scholar
- [Fok95]Jeroen Fokker, ‘Functional parsers'. In [JM95], pp. 1–23. Also http://www.cs.ruu.nl/∼jeroen.Google Scholar
- [JDS94]Johan Jeurig, Luc Duponcheel and Doaitse Swierstra, Grammars and Parsing. Course notes, Department of Computer Science, Utrecht University, 1994. From http://www.cs.ruu.nl/∼luc.Google Scholar
- [JM95]Johan Jeuring and Erik Meijer (eds.), Advanced functional programming. Springer LNCS 925, 1995.Google Scholar
- [Jon94]ark Jones, Gofer 2.30 release notes http://www.cs.nott.ac.uk/Department/Staff/mpj.Google Scholar
- [JGS93]Neil Jones, Carsten Gomard and Peter Sestoft, Partial evaluation and automatic program generation. Prentice Hall, 1993.Google Scholar
- [Lan70]Serge Lang, Linear Algebra. Addison-Wesley, 1970.Google Scholar
- [Mee95]Lambert Meertens, Category theory, Course notes, Department of Computer Science, Utrecht University, 1995. Ask email@example.com.Google Scholar
- [Meij95]Erik Meijer and Doaitse Swierstra, Implementation of Programming Languages. Course notes, Department of Computer Science, Utrecht University, 1995. From http://www.cs.ruu.nl/∼erik.Google Scholar
- [Wad95]Philip Wadler, ‘Monads for functional programming'. In [JM95], pp. 24–52. Also: http://www.dcs.glasgow.ac.uk/∼wadler.Google Scholar