Rating:        Based on 1 rating
Reviewed:  0 reviews
Downloads: 3941
Released: Sep 27, 2011
Updated: Sep 27, 2011 by giuseppemag
Dev status: Beta Help Icon


Documentation Chapter 1.1
documentation, 75K, uploaded Sep 27, 2011 - 1353 downloads
Application Chapter 1.2
application, 131K, uploaded Sep 27, 2011 - 588 downloads
Application Chapter 2.1
application, 135K, uploaded Sep 27, 2011 - 393 downloads
Application Chapter 2.2
application, 140K, uploaded Sep 27, 2011 - 317 downloads
Application Chapter 3.1
application, 97K, uploaded Sep 27, 2011 - 307 downloads
Application Chapter 3.2
application, 144K, uploaded Sep 27, 2011 - 294 downloads
Application Chapter 4.1
application, 234K, uploaded Sep 27, 2011 - 314 downloads
Application Chapter 4.1
application, 146K, uploaded Sep 27, 2011 - 375 downloads

Release Notes

This set of notes consists of an in-depth presentation of the functional language F#. Each topic corresponds to a chapter of notes, which is divided in two parts: an example application and a general discussion of the constructs used in the application. For example, the slides of Chapter 1 are made up by the two blocks “Chapter 1 - Application” and “Chapter 1 - General Discussion”.
There are four chapters and they are, respectively, about:
 Chapter 1: basic control flow, tuples, functions
 Chapter 2: basic data structures and information flow (records and units of measure)
 Chapter 3: lists and sequences
 Chapter 4: trees and discriminated unions
The applications which open each chapter are taken from the field of physics simulations and videogames, to make the course look more appealing to the students and also to show how the language can be used in “real” practical contests rather than in artificial problems, like for example computing the factorial of a number. In the general discussion section, on the other hand, the constructs are explained in detail with small (and more traditional) samples of code (there the factorial finds its place! ).
The course lessons can be organized in two different ways: the first is the usual one, that is explaining the constructs of each chapter first, and then the related application as a review. The second way is a bit unusual and it consists in presenting the application first, which should serve as an incentive for the students to study the related topics, and then go into the details of the constructs used in the example through the general discussion. Such approach starts from a concrete problem and then explores what it is needed to code the solution to the problem. To make this second option viable, the sample applications are largely commented. The applications are, respectively:
 Chapter 1: a bouncing ball
 Chapter 2: the Saturn V rocket
 Chapter 3: an asteroid field
 Chapter 4: a large asteroid field optimized with quad-trees
The detailed list of the topics of each chapter is the following:
Chapter 1 - Basic Data Manipulation
Duration: 6-8 h
• Application: bouncing ball
• Let binding
• Functions
o Higher order
o Recursive
o Partially specialized
o Generic types
• Conditional expressions
• Imperative capabilities

Chapter 2 - Datatypes and Bookkeeping
Duration: 4-6 h
• Application: Saturn V rocket from the Earth to the Moon
• Record
• Members
• Generic records
• Units of measure

Chapter 3 - Lists and Sequences
Duration: 4-8 h
• Application: asteroid field
• Lists for finite sequences of data
• Manipulation of lists
o Recursive functions
o Pattern matching
• Library of List operators
o Map, filter, fold
• Generation of lists with many elements
o Recursive functions
o List.init
o List comprehension

Chapter 4 - Managing Multiform Data with Discriminated Unions
Duration: 6-8 h
• Application: larger asteroid field
• Discriminated unions
o Choice/Option/Lists
• Binary trees
• Generic constraints
• Struct
• Arithmetic expressions
• Arithmetic expressions with units of measure

Source code
All the source code shown in the course materials (both the applications and the small samples) is available at the url:
Students are strongly advised to download the code and experiment with it to take practical confidence with the language, for example trying to modify the applications. The code can be used in Windows (with Visual Studio) but also in MacOSX or Linux, thanks to Mono and MonoDevelop. Visual Studio 2010 can be freely downloaded through the MSDNAA account of your university.

These teaching materials are taken from the book, Friendly F#: Fun with game programming and XNA. In particular, the four chapters of the course retrace the first four chapters of the book.

Reviews for this release