Preliminaries Last updated: 2022-04-10

Welcome to the Functional Programming Course Web Page.

Course information

Instructor Associate Professor Dr. Mihailescu Marius Iulian
E-mail m.mihailescu.mi@spiruharet.ro
Teaching Assistant Associate Professor Dr. Mihailescu Marius Iulian

Course description

The primary goal of this type of programming paradigms course is to introduce students to the fundamentals of functional programming using the Haskell and F# (F Sharp) language. You'll pick up a variety of skills and see how they might be applied to the developing process of various programs.

A solid link between mathematics and software design is provided by functional programming. Haskell and other functional programming languages have characteristics that make them appealing for parallel processing, quick software prototyping, and mathematical computations. Programs are treated as mathematical equations in functional programming. This makes it possible to write programs that are both clear and succinct for a variety of applications. Significantly, it enables formal proof methods to be used to establish the desired features of these programs. Their effectiveness can also be increased using the same techniques.

Experience has shown that functional programming approaches can also be utilized to enhance the design of programs written in imperative languages after they have been learnt.

The course serves as an introduction to functional programming concepts. It presents key ideas and related methods for creating programs that are clear and concise. It also describes how to convert them into more effective programs. The course will give students practical experience using current functional programming languages like Scheme and Haskell.

Course Objective(s)

The main objective(s) of the course and the expected outcomes are:

  • Learn the fundamentals of functional programming and how to think in functional paradigm terms.
  • Using abstraction within the program strucutre.
  • Gain the ability to explain and use the recursion (at a glance), as well as being capable to make the difference between recursive process and iterative process.
  • Using high-order functions (HOF) and implement complex approaches for different problems.
  • What to do when we are dealing with delays in the evaluation for infinite data structures.
  • Understanding how the code is evaluated.
  • Being able to write complex programs for different topics, such as databases, distributed systems, cryptography, artificial intelligence or machine learning.

Course Structure

# Course Title Date and Time
01 Introduction in Functional Programming October 4th, 2022
02 Haskell, GHC, Data Types, and Operators October 11th, 2022
03 Funcții Standard October 18th, 2022
04 Recursion October 25th, 2022
05 High Order Functions (HOF) and Lambda Expressions November 1st, 2022
06 IO Standard Functions and Files November 8th, 2022
07 Monads November 15th, 2022
08 Monads Transformers November 22nd, 2022
09 Exceptions November 29th, 2022
10 TBA December 6th, 2022
11 TBA December 13rd, 2022
12 TBA December 20th, 2022

Laboratory Structure

# Laboratory Title Date and Time
01 Applications and Exercises with Lambda Calculus October 4th, 2022
02 Exercises with Data Types and Operators October 11th, 2022
03 Exercises with Recursion October 18th, 2022
04 Exercises with High-Order Functions (HOF) October 25th, 2022
05 Applications with Standard Functions and Files November 1st, 2022
06 Exercises with Monads November 8th, 2022
07 Exercises with Monad Transformers November 15th, 2022
08 Applications with Exceptions November 22nd, 2022
09 Exercises with Exceptions November 29th, 2022
10 TBA December 6th, 2022
11 TBA December 13rd, 2022
12 TBA December 20th, 2022

Examination

The final mark is composed from mid-terms and final exam. See the details from below.

The mid-terms represents 50% from the final mark.

  • 1st mid-term (10%) - Course: October 31st, 2022
  • 2nd mid-term (20%) - Laboratory: November 14th, 2022
  • 3rd mid-term (20%) - Laboratory: November 28th, 2022

For the 1st mid-term the student will receive 30 questions, each question will have 3 points (30 * 3p = 90p). For this mid-term test (evaluation) 10p ex-officio point will be received.

The final exam will represent 50% from the final mark.

Bibliography

Courses

The list of courses is:

  • C01 - Introduction to Functional Programming
  • C02 - Haskell, GHC, Data Types, and Operators

C01 - Introduction to Functional Programming

Course objective
In this course we will learn about functional programming, why it is important, its strenghts, advantages and disadvantages, compared with other programming paradigms. We will take into consideration examples from other programming paradigms and languages and compare them with functional programming.

Resources

C02 - Haskell, GHC, Data Types, and Operators

Course objective
In this course we will learn about Haskell and GHC environment, which are the main data types for Haskell, which are the operators and how they work between expressions and how they are used in the evaluation process.

Resources

Laboratories

The list of laboratories is:

  • L01 - Applications and Exercises with Lambda Calculus
  • L02 - Exercises with Data Types and Operators

L01 - Applications and Exercises with Lambda Calculus

Laboratory objective
In this laboratory will learn how to resolve exercises using a formal system in mathematical logic for expressing computation based on function abstraction and application utilizing variable binding and substitution, which is known as lambda calculus. It is a general-purpose computational model that can imitate any Turing computer.

Laboratories

Solutions

L02 - Exercises with Data Types and Operators

Laboratory objective
Learning the basics for data types and operators, dealing with the main types and the operations between multiple data types. We will learn about the various Haskell operators in this chapter. Similar to other programming languages, Haskell handles several fundamental operations like addition, subtraction, multiplication, etc. in an intelligent manner. Future laboratories will teach us more about various operators and how to use them.

Laboratories

Solutions