Degree course: 
Corso di First cycle degree in COMPUTER SCIENCE
Academic year when starting the degree: 
Academic year in which the course will be held: 
Course type: 
Supplementary compulsory subjects
Second semester
Standard lectures hours: 
Detail of lecture’s hours: 
Lesson (48 hours)

The prerequisites for a profitable learning and for achieving the objectives of the course include the knowledge of the Java Programming Language presented in the fundamental teaching of Programmazione, which is therefore a pre-requisite. Moreover, the student is expected to have a good knowledge of discrete mathematics and basic data structures provided in the courses of Algebra e geometria and Algoritmi e strutture dati.

The exam aims to verify the acquisition and the correct understanding of the contents of the course. The exam is written and structured as follows: (part A) three questions concerning the theoretical aspects of functional programming languages; (part B) three exercises of the kind discussed during class exercises.

The final grade will be determined as follows: 50% from the knowledge of definitions and examples of the concepts dealt during the course (part A); 50% from the proper conduct of the exercises.

The final grade is expressed in a score out of 30, where 18 represents the minimum and 30 the maximum.

Voto Finale

This course provides an introduction to functional programming and the related programming techniques. The primary goal is to provide students with the necessary knowledge to understand and to develop programs in the functional programming languages using Scala as case study. The course is thus formed by lessons that illustrate the fundamentals of functional programming and the related programming techniques and programming exercises using the Scala programming language.

Expected learning outcomes. Students will be able to.
• demonstrate their understanding of the basic principle of functional programming languages and their computational model;
• demonstrate their understanding of the principal programming techniques and data-structure in the functional programming setting;
• formulate and solve problems proposing the most suitable abstractions for their formalization in a functional programming setting;
• recognize and use the proper terminology of functional languages and functional programming.

• Fundamentals concepts of imperative, object-oriented and functional programming languages. (4h)
• Fundamentals of functional programming languages: recursion and tail-recursion. (6h)
• Substitution model, evaluation strategies (call-by-name and call-by-value). (4h)
• Higher-order functions and currying. (6h)
• Functional programming and objects. Type hierarchy, type parameters, polymorphism and constraints. Implementation in Scala. (6h)
• The decomposition problem and pattern matching. (4h)
• Mutable and immutable data structures. List, Vector, Trees, Maps. (8h)
• Map, reduce and filter. (6h)
• Correctness. (4h)

Martin Odersky, Lex Spoon, Bill Venners. Programming in Scala. Third edition. 2016

Slides and exercises (PDF) are available on the e-learning platform.


The teaching activities consists of lectures (48h). The arguments presented during lectures are applied through class exercises; students are expected to actively participate in exercises discussion. The presented exercises have an essential role in preparing the final exam.

Office hours: by appointment via email.