---
type: bookmarks
tags: ['fp']
status: release
ctime: 2022-10-16
mtime: 2026-10-07
---

- monad
  - [Functional programming and Jotai — Jotai](https://jotai.org/docs/basics/functional-programming-and-jotai)[^215-1]
  - [Inventing Monads](https://stopa.io/post/247)[^215-2]
  - [How Monads Solve Problems | ThatsNoMoon](https://thatsnomoon.dev/posts/ts-monads/)[^215-3]
  - [The Absolute Best Intro to Monads For Software Engineers - YouTube](https://www.youtube.com/watch?v=C2w45qRc3aU)[^215-4]

- pipe
  - [I've used the pipe() function 2,560 times and I can tell you it's good! – Obvibase under the hood](https://www.obvibase.com/dev-blog/i-ve-used-the-pipe-function-2-560-times-and-i-can-tell-you-it-s-good)[^215-5]
  - [Hack Pipe for Functional Programmers: How I learned to stop worrying and love the placeholder](https://jamesdigioia.com/hack-pipe-for-functional-programmers-how-i-learned-to-stop-worrying-and-love-the-placeholder/)[^215-6]
  - [A quick introduction to pipe() and compose() in JavaScript | by Yazeed Bzadough | We’ve moved to freeCodeCamp.org/news | Medium](https://medium.com/free-code-camp/pipe-and-compose-in-javascript-5b04004ac937)[^215-7]

- hoc
  - [Functional JavaScript: What are higher-order functions, and why should anyone care?](https://jrsinclair.com/articles/2019/what-is-a-higher-order-function-and-why-should-anyone-care/)[^215-8]

---

[^215-1]: Jotai 의 `atom((get) => …)` 이 `async`/`await` 와 같은 모양인 건 우연이 아니다 — atom 과 Promise 가 둘 다 모나드라 같은 do-notation 을 쓴다. 모나드는 `of`·`map`·`join` 셋을 구현할 수 있는 구조.

[^215-2]: 타입·범주론 없이 모나드를 "발명"해 보는 글. null 체크 조건문을 없애려고 `whenExists` 체이너를 만들다가, 체이너를 돌려주는 함수끼리 이으려니 중첩이 생기고 그걸 펴는 과정에서 모나드가 나온다.

[^215-3]: 2013년 콜백 지옥에서 출발해 Promise·배열의 공통 패턴을 뽑아 Functor → Monad 로 가는 TypeScript 글. async/await 가 모나드 위에 지은 문법이라는 데까지 간다(보너스로 Monoid).

[^215-4]: Studying With Alex 채널의 모나드 입문 영상.

[^215-5]: `pipe(x, a, b)` 를 2,560번 쓴 회고. `b(a(x))` 를 왼쪽에서 오른쪽으로 읽게 하는 함수(`reduce` 한 줄)이고, 함수를 합성만 하는 `compose` 보다 고차 함수로 생각할 필요가 없어 읽기 쉽다 — 메서드 체이닝을 네이티브 메서드 밖으로 넓힌 것.

[^215-6]: 파이프 연산자 `|>` 제안에 4년 관여한 저자가 F# 파이프 지지에서 Hack 파이프(플레이스홀더)로 돌아선 이유. Hack 파이프가 커링 없이도 쓸 수 있어 함수형 라이브러리와 일반 JS 사이를 잇는다는 주장.

[^215-7]: `pipe` 는 함수 n 개를 왼쪽→오른쪽으로, `compose` 는 오른쪽→왼쪽으로 잇는다는 입문 (freeCodeCamp 로 옮겨진 글).

[^215-8]: 고차 함수 입문. 함수가 값(일급 시민)이라 인자로 넘기고 돌려줄 수 있고, 그게 DOM 조작 같은 실무 코드에서 왜 쓸모 있는지 예제로 보인다.
