Functional Programming
Faculteit  Science and Engineering 
Jaar  2019/20 
Vakcode  INBFP08 
Vaknaam  Functional Programming 
Niveau(s)  bachelor 
Voertaal  Engels 
Periode  semester I a 
ECTS  5 
Rooster  rooster.rug.nl 
Uitgebreide vaknaam  Functional Programming  
Leerdoelen  At the end of the course, the student is able to: 1) write programs in a functional style. 2) reason formally about functional programs. 3) use polymorphism and higherorder functions. 4) reason about the time and space complexity of programs. 5) program in Haskell. 

Omschrijving  Functional programming is a declarative programming paradigm that treats computation (execution) as the evaluation of pure mathematical functions. A function is called pure if its output is always the same for the same input and its evaluation has no side effects. As a result, expressions in functional programs can be replaced with their corresponding values without changing the behavior of the program. Functional languages are based on the use of functions that, if required, can have functions as an argument and can produce functions as a result. The typing of a function or expression is thus very important. In functional programs, a variable within its scope has the same meaning everywhere (referential transparency). Moreover, data is immutable, which means that it cannot change after creation. A direct consequence of this property is that functional programming languages typically do not have looping constructs (for, while) since a looping variable needs to be mutable. Therefore, recursion is the only way to implement iteration. In Haskell and some other functional languages, the value of an expression is only calculated when it is needed (lazy evaluation). This allows the construction of infinite data structures (e.g. a list of all prime numbers). Referential transparency and the lack of side effects make functional programs relatively easy to analyse. An important theme of the course is how to apply mathematical reasoning to programs, so as to prove their correctness. These proofs almost always use mathematical induction. The aim of the module is to teach students to design and analyse functional programs in Haskell, whereby an understanding of the efficiency and general typing aspects is very important. The course has a theoretical part which is assessed using a written exam, and a practical part that consists of three practical assignments that need to be implemented in Haskell. The practical and the exam must be done in the same academic year. 

Uren per week  
Onderwijsvorm  Hoorcollege (LC), Practisch werk (PRC), Werkcollege (T)  
Toetsvorm 
Practisch werk (PR), Schriftelijk tentamen (WE)
(Let P=practicals, E=Exam. The final grade (F) is obtained as follows: F = (3*P+4*E)/7, under the constraint that E and P both are >= 5.) 

Vaksoort  bachelor  
Coördinator  dr. A. Meijster  
Docent(en)  dr. A. Meijster  
Verplichte literatuur 


Entreevoorwaarden  This course assumes no prior knowledge, but advises that the student has some programming experience in a regular programming language (like C, Java, Matlab). Moreover, secondary education equivalent to Dutch preuniversity education (VWO second phase), is required, including sufficient Mathematical skills (wiskunde B).  
Opmerkingen  
Opgenomen in 
