Using F# for teaching
This page lists some resources for teaching F# in formal settings.
Peter Sestoft, IT University of Copenhagen, Denmark
This is a two-part video lecture by Peter Sestoft, professor from the IT University of Copenhagen, Denmark. In the lecture, Peter introduces the curriculum, lecture plan and lecture notes for the course “Programs as data” that uses the functional programming concepts in F# to teach students language concepts and implementation details.
Michael R. Hansen and Hans Rischel
This introduction to the principles of functional programming using F# shows how to apply theoretical concepts to produce succinct and elegant programs. Coverage includes advanced features in the .NET library, the imperative features of F# and topics such as sequences, computation expressions and asynchronous computations. The book contains a broad spectrum of examples and exercises.
Further material comprising the programs in the book, lecture slides and mini-projects are found on the book web site.
Programming Language Concepts uses a functional programming language (F#) as the metalanguage in which to present all concepts and examples, and thus has an operational flavour, enabling practical experiments and exercises. It includes basic concepts such as abstract syntax, interpretation, stack machines, compilation, type checking, and garbage collection techniques, as well as the more advanced topics on polymorphic types, type inference using unification, co- and contravariant types, continuations, and backwards code generation with on-the-fly peephole optimization.
Programming Language Concepts covers practical construction of lexers and parsers, but not regular expressions, automata and grammars, which are well covered elsewhere. It throws light on the design and technology of Java and C# to strengthen students’ understanding of these widely used languages. The examples present several interpreters and compilers for toy languages, including a compiler for a small but usable subset of C, several abstract machines, a garbage collector, and ML-style polymorphic type inference. Each chapter has exercises based on such examples.
Lectures and course material
Introduction to functional programming Tomas Petricek, Charles University, Czech Republic
The course explains basic functional concepts such as function composition, functional data types and higher-order functions. It highlights some interesting connections between these and concepts that student may already know or will learn in various mathematics lectures. The site includes lecture slides and a number of simple homeworks that usually require some interesting insight.
Functional Programming with F# Björn Lisper, Mälardalen University, Sweden
The course gives the students a solid understanding of functional programming, its applications, and its strengths and weaknesses. It includes topics such as recursion, modern type systems, higher order functions, lazy evaluation and tradeoffs of using side effects. In addition it also provides short orientations of lambda calculus and type inference, in order to enhance the understanding of the functional programming paradigm.
Programming Paradigms Rowan Davies, The University of Western Australia
This unit explores and compares the main alternative paradigms for high-level programming. It considers important modern paradigms such as functional programming, logic programming and concurrent programming, and compares these with the mainstream paradigms of imperative programming and object-oriented programming. It considers past and future trends in programming paradigms and explores the motivation for each paradigm, the concepts which define it, and how each paradigm can be used in practice to complete programming tasks. It also compares the advantages of each paradigm in the software production process, with particular emphasis on productivity, scalability, program behaviour, and the correctness of programs. The unit focuses on both fundamental concepts and practical software development, with the former enabling the latter.
Functional programming at St Matthews Samin Ishtiaq, Microsoft Research Cambridge
Samin Ishtiaq taught a 1 hour crash course in functional programming to 10/11 year olds at a local primary school. The course leads up to calculating areas and volumes, which is what the students were learning in maths at that time. This was the first experience of programming for almost all of the students.