Conceptly

Understand Functional Programming visually

Explore each concept's architecture through animated diagrams. Click a card to dive deeper.

📥Inputλf(x)📤Output
λ

순수 함수

A function that always returns the same output for the same input, with no side effects

A pure function is a function whose output depends only on its arguments and which causes no observable side effects. Given the same inputs, it will always return exactly the same value, and nothing outside the function changes as a result of calling it. In functional programming, pure functions are the smallest unit of logic you can reason about in isolation. The more of a system's core behavior you can keep pure, the easier it becomes to explain, test, and rearrange.

🔒Original🔄{ ...obj }New Value
🔒

불변성

A value that, once created, is never changed in place -- updates produce new values instead

Immutability means that once a value is created, it is never changed. Instead of mutating an existing object or array, every update produces a new one. The original remains intact and any code still holding a reference to it sees the same value it always did.

📝함수 정의📦변수에 할당🔁인자/반환으로
🎯

일급 함수

Treating functions as values that can be passed, returned, and stored

First-class functions means a language treats functions as values. A function can be assigned to a variable, passed as an argument, returned from another function, or stored in an array or object — the same way any other value can.

🎯함수 A⬆️고차 함수새 동작
⬆️

고차 함수

A function that takes functions as input or returns them as output

A higher-order function is a function that either accepts another function as an argument, returns a function as its result, or both. This is distinct from ordinary functions, which only work with data values. Higher-order functions are only possible in languages where functions are first-class values.

🏠외부 함수📦클로저🔒캡처 변수
📦

클로저

A function that remembers the variables from the scope where it was created

A closure is a function that retains access to the variables of its enclosing scope even after the outer function has finished executing. The inner function does not copy those variables -- it holds a live reference to them, so reads and writes affect the same binding that the outer scope created.

🔵함수 f🔗pipe/compose🟣함수 g
🔗

함수 합성

Building complex behavior by chaining small, single-purpose functions

Function composition is the practice of combining two or more functions into a new function by wiring the output of one directly into the input of the next. Instead of writing a long procedure with many intermediate variables, you describe the transformation as a sequence of named steps, and a compose or pipe utility connects them automatically.

📋Array Input🔄map/filter/reduceResult
🔄

map/filter/reduce

The three core operations for transforming and summarizing collections

map, filter, and reduce are higher-order functions built into most functional and multi-paradigm languages. They express the three most common things you do with a list: transform each item, keep only some items, or fold all items into one value.

Problem🔁Recursive Call🛑Base Case
🔁

재귀

Solving a problem by having a function call itself on a smaller version of it

Recursion is a technique where a function solves a problem by calling itself with a simpler version of the input, repeating until it reaches a base case that can be answered directly. The results from smaller calls are then combined to produce the answer for the original input.