100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached 4.2 TrustPilot
logo-home
Summary

AQA A-Level Computer Science Summary - Fundamentals of Functional Programming

Rating
-
Sold
-
Pages
5
Uploaded on
21-08-2025
Written in
2022/2023

A concise summary of the notes I used when I was studying for my A-levels. I have checked that this summary follows all of the points on the AQA specification to ensure that it covers everything that you will need to know. It includes all of the definitions and examples that you need to know, as well as comparison tables to be able to quickly breakdown concepts and how they relate to eachother. I wrote this with the exam questions in mind and alot of the knowledge within it should be worded / explained in such a way so that you can directly answer a question with this document. I hope you all find it useful. Best of luck.

Show more Read less









Whoops! We can’t load your doc right now. Try again or contact support.

Document information

Uploaded on
August 21, 2025
Number of pages
5
Written in
2022/2023
Type
Summary

Content preview

🏴󠁧󠁢󠁳󠁣󠁴󠁿
Fundamentals of functional
programming
Last edited time @October 1, 2023 10:49 AM

Status Done

Function types
A function type is the way a function can be defined through its inputs and outputs.
These have been written below in the general form and Haskell respectively:
The domain is the set of possible inputs that a function can take. For the Haskell
example below, the domain would be the integers as the function returns the
square of a number. A domain is usually a set of numbers such as the integers, Z,
or reals, R, but they can include strings, such as in regex. More domains and co-
domains can be found at the page below.

🔒 Fundamentals of Data representation
The codomain is the set of possible outputs of a function. These can be numbers,
strings or even other functions.


myFunction :: Integer -> Integer
f :A→B
myFunction n = n ^ 2
where A = domain
and
B = co − domain


First-class objects and higher order functions
A first class objects is one that can be accepted as an argument into a
function or be returned by one. Some first class objects include, integers and
most notable other functions.

A higher order function is one that can take one or more functions as
arguments and then also return functions or both. Some important example



Fundamentals of functional programming 1

, are the map, fold, filter functions.

Partial and complete function application
Function application is the process of giving inputs to a function and it returning
the specified output. Take the example below:


volume = int * int * int -> int




We are supplying three parameters, which form the argument of the function.
Then the function returns an integer. Because all parameters have been supplied
and the integer is returned the function has been completely applied.


Partial Application
Partial application is the process of supplying some of the inputs to a function
which can then be used to create a useful output or intermediary step. Ie. Not all
parameters are given to a function at once. This allows for more versatile
functions. Take the following example:

We have defined 2 functions

Used both functions within Haskell, where one can be partially applied and
one cannot.


[Example 1] [Example 1]
add: int x int -> int add(x,y): add (2,3) = 5

[Example 2] [Example 2]
add: int -> int -> int add(x,y): add (2,3) = add2 3 = 5




Function composition.
Function composition is the process of combining simpler functions together to
form more complex ones. It works by applying the inner most function first and
that forms the argument for the next function. It is the same process that is done
within maths as with f(g(x)) = (x + 1)2 . This can be converted to code as
shown below:


-- Defining outer function
myFunc1 :: Integer -> Integer




Fundamentals of functional programming 2
£3.49
Get access to the full document:

100% satisfaction guarantee
Immediately available after payment
Both online and in PDF
No strings attached

Get to know the seller
Seller avatar
andreasmullen

Also available in package deal

Thumbnail
Package deal
AQA A-Level Computer Science Complete Summary
-
10 2025
£ 34.84 More info

Get to know the seller

Seller avatar
andreasmullen The University of Birmingham
View profile
Follow You need to be logged in order to follow users or courses
Sold
0
Member since
4 months
Number of followers
0
Documents
23
Last sold
-

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their exams and reviewed by others who've used these revision notes.

Didn't get what you expected? Choose another document

No problem! You can straightaway pick a different document that better suits what you're after.

Pay as you like, start learning straight away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and smashed it. It really can be that simple.”

Alisha Student

Frequently asked questions