# Currying - Writing Sophisticated Functional Code

![rw-book-cover](https://i.ytimg.com/vi/Q01LEKKrTmA/maxresdefault.jpg)

## Metadata
- Author: [[Coding with Yalco]]
- Full Title: Currying - Writing Sophisticated Functional Code
- Category: #articles
- URL: https://www.youtube.com/watch?v=Q01LEKKrTmA
- Archive: https://web-archive.alecodes.page/bookmarks?bf=1&search=&title=Currying%20-%20Writing%20Sophisticated%20Functional%20Code
> [!tldr]
> #FunctionalProgramming #Coding #Programming

In this video, we look at one of the representative techniques of functional programming, currying. Currying is a coding method that breaks down tasks that should be performed at once into multiple stages. To explain this, we use a function that makes a sandwich as an example, where a traditional function handles the three ingredients (bread, meat, vegetables) of a sandwich all at once, but Currying divides this process into each ingredient, or argument. This allows for the execution of functions in divided stages. By doing this, one advantage is that the original process can be diversely branched into multiple stages and branches for each ingredient. This video provides a detailed code example and explanation of this. In the next video, we're going to look at monads, one of the most challenging topics in functional programming.

## Highlights
Currying is a coding method that  allows you to break down tasks that   used to be done at once into multiple steps [View Highlight](https://read.readwise.io/read/01j9rca7zb81g8vzbx7n2xj22e))

A function created with  Currying executes like this.  As you can see, it gets executed  individually as many times as the number   of arguments the original function had. [View Highlight](https://read.readwise.io/read/01j9rcc05k5d11mf16szvrs8y3))

