Skip to content

Commit af8d4a6

Browse files
committed
Make functional programming collection a journey
1 parent 8a4e7e8 commit af8d4a6

10 files changed

+10
-0
lines changed

content/snippets/js/s/currying.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ cover: tulips-and-reeds
77
excerpt: Currying is a process that transforms a function that takes multiple arguments into a series of functions that each take a single argument.
88
listed: true
99
dateModified: 2023-12-29
10+
journeyId: js/functional-programming
1011
---
1112

1213
Functional programming often makes use of **currying**, which is a process that transforms a **function that takes multiple arguments** into a **series of functions that each take a single argument**. This makes code more flexible and reusable.

content/snippets/js/s/function-arity.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ cover: radio-monstera
77
excerpt: Function arity is a simple, yet useful concept in functional programming, especially when combined with currying.
88
listed: true
99
dateModified: 2023-12-29
10+
journeyId: js/functional-programming
1011
---
1112

1213
Function arity is the **number of arguments a function expects**. While it sounds very theoretical, it's actually quite useful in practice, especially in functional programming.

content/snippets/js/s/function-composition.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ cover: digital-nomad-16
77
excerpt: Understand the basics of function composition, a fundamental concept in functional programming.
88
listed: true
99
dateModified: 2023-12-29
10+
journeyId: js/functional-programming
1011
---
1112

1213
In functional programming, **function composition** is the process of combining multiple functions to produce a new function. This technique is used heavily in functional programming, but it can also be used in imperative programming. Its main benefits are **readability**, **reusability** and **modularity**.

content/snippets/js/s/functional-programming-introduction.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ cover: driftwood
77
excerpt: A short introduction to the functional programming paradigm.
88
listed: true
99
dateModified: 2023-12-30
10+
journeyId: js/functional-programming
1011
---
1112

1213
Functional programming is a **programming paradigm** that treats computation as the evaluation of mathematical functions and avoids changing state and mutable data. It emphasizes the application of **functions**, in contrast to the imperative programming style, which emphasizes changes in state.

content/snippets/js/s/higher-order-functions.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ cover: rock-climbing
77
excerpt: Learn everything you need to know about higher-order functions with this short guide and level up your programming skills.
88
listed: true
99
dateModified: 2021-11-07
10+
journeyId: js/functional-programming
1011
---
1112

1213
Higher-order functions are **functions that operate on other functions**, either by accepting them as arguments or by returning them as their results. This allows us to create an abstraction layer over actions, not just values.

content/snippets/js/s/immutability.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ cover: stars-n-snow
77
excerpt: Immutability is a fundamental concept you should be familiar with when learning functional programming.
88
listed: true
99
dateModified: 2023-12-14
10+
journeyId: js/functional-programming
1011
---
1112

1213
In **traditional programming**, **data is often mutable**, meaning that it can be manipulated and altered at will after it is created. Let's look at an example:

content/snippets/js/s/partially-apply-function.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ cover: rocky-beach
77
excerpt: Learn how to leverage partial application to improve the reusability of your JavaScript functions.
88
listed: true
99
dateModified: 2024-01-31
10+
journeyId: js/functional-programming
1011
---
1112

1213
Partial application is a technique used to **fix a number of arguments** to a function, producing another function of **smaller arity**. This is particularly useful in situations where you want to create a new function by pre-filling some of the arguments of an existing function.

content/snippets/js/s/pure-functions.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ cover: dark-leaves
77
excerpt: Pure functions are a very important concept to know, especially if you're interested in functional programming.
88
listed: true
99
dateModified: 2021-12-19
10+
journeyId: js/functional-programming
1011
---
1112

1213
Pure functions are one of the most important concepts to learn and understand, especially if you're interested in functional programming.

content/snippets/js/s/recursion.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ cover: curve
77
excerpt: Recursion is a very important programming concept all developers should be familiar with.
88
listed: true
99
dateModified: 2022-01-23
10+
journeyId: js/functional-programming
1011
---
1112

1213
Recursion is the **repeated application of a process**. In JavaScript, recursion involves functions that call themselves repeatedly until they reach a base case. The base case breaks out of the recursion loop, thus allowing previous calls to the function to return a result. If no such case exists, the function will call itself indefinitely resulting in a stack overflow.

content/snippets/js/s/reorder-function-arguments.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ cover: interior-11
77
excerpt: Learn how to reorder the arguments of a JavaScript function to fit your needs.
88
listed: true
99
dateModified: 2024-08-05
10+
journeyId: js/functional-programming
1011
---
1112

1213
While JavaScript's APIs have come a long way, they're often not as flexible as we'd like. Sometimes, you need to **change the order of arguments** in a function to fit your needs. This is also a fairly common problem when working with libraries or APIs that don't provide the exact signature you need. Luckily, rearranging function arguments is easy with a few lines of code.

0 commit comments

Comments
 (0)