Functional Programming

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/11

encourage image

There's no tags or description

Looks like no tags are added yet.

Last updated 2:07 PM on 5/27/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai

No analytics yet

Send a link to your students to track their progress

12 Terms

1
New cards

What is functional programming?

a programming paradigm where code is written by applying and composing functions, avoiding side effects and mutable states

2
New cards

Advantages of functional programming

  • requirements are better defined as functions than complex steps - fewer errors during implementation

  • functions can be re-used within a program

  • no side effects → easier to debug and test

  • supports parallel/distributed processing (able to be used on big data)

3
New cards

Domain

All valid inputs for a function

4
New cards

Co-domain

The set of all possible outputs that a function could return

5
New cards

First-Class Objects

values that can be assigned to variables, passed as arguments, returned from functions and used in expressions

6
New cards

Higher-order functions

Functions that

  • take a function as an argument

and/or

  • return a function

7
New cards

Examples of higher-order functions

map, fold (reduce) and filter

8
New cards

Partial function application

Fixing one or more arguments of a function to produce a new function with fewer parameters

9
New cards

List Processing

splitting a list into the head (first index) and the tail (remaining elements)

10
New cards

Fold

Combines elements in a list into a singular value by repeatedly applying a function

11
New cards

Map

applies a function to each element in a list and returns a new list of results

12
New cards

filter

applies a function to each elements in a list, only keeping those that return True