# The Power of Composition (Scott Wlaschin) 보고 느낀 점 - 합성하려다보니 Currying과 Monad

> Clean Markdown view of GeekNews topic #21344. Use the original source for factual precision when an external source URL is present.

## Metadata

- GeekNews HTML: [https://news.hada.io/topic?id=21344](https://news.hada.io/topic?id=21344)
- GeekNews Markdown: [https://news.hada.io/topic/21344.md](https://news.hada.io/topic/21344.md)
- Type: news
- Author: [ohyecloudy](https://news.hada.io/@ohyecloudy)
- Published: 2025-06-08T13:40:25+09:00
- Updated: 2025-06-08T13:40:25+09:00
- Original source: [ohyecloudy.com](https://ohyecloudy.com/pnotes/archives/the-power-of-composition-scott-wlaschin-ndc-oslo-2018/)
- Points: 8
- Comments: 2

## Summary

**함수 합성**은 **타입**을 AND 또는 OR로 조합하며, input과 output의 개수가 다를 때 **Currying**과 **Monad**로 문제를 해결합니다. Currying은 input을 하나로 만드는 기술이고, Monad는 output을 하나로 만들어 **처리 흐름**을 단순화합니다. 함수 조합의 목적과 원리를 명확히 설명하여 **코드 재사용**의 새로운 관점을 제시합니다.

## Topic Body

-   재사용 방법의 하나인 합성은 타입과 함수  
    -   타입은 AND 또는 OR로 합성  
-   input 개수와 output 개수가 같을 때는 함수 합성이 쉽다  
    -   함수의 output을 다음 함수의 input으로 넘기면 끝  
    -   개수가 다를 때 이걸 해결할 방법이 필요  
-   input 개수가 더 많을 때는 Currying(커링)  
    -   input 개수를 하나로 만들어준다  
-   output 개수가 더 많을 때는 Monad(모나드)  
    -   output 개수를 하나로 만들고 처리 혹은 처리되지 않음으로 구분  
        -   처리된 건 다음 함수로 그냥 넘김  
        -   처리되지 않은 건 함수로 처리 시도  
    -   알고 보니 이게 Monad  
    -   output을 Monad에 담고 bind로 함수 조합  
  
함수 조합으로 설명하면서 "왜?"에 대한 답을 주니깐 이해가 잘 됩니다. 모나드를 상자에 넣고 꺼내고 뭐 이런 식으로 설명한 글을 봤을 때, 이해가 잘 되지 않았었는데요. 지금 생각하면 "왜"가 빠진 글이라서 그랬던 것 같습니다.

## Comments



### Comment 39890

- Author: kayws426
- Created: 2025-06-09T22:02:46+09:00
- Points: 1

잘 읽었습니다~

### Comment 39856

- Author: akarin
- Created: 2025-06-09T09:27:57+09:00
- Points: 1

잘 봤습니다. 이렇게 보니까 이해하기 쉽네요
