News for hackers. Stuff that matters.
Re:Show HN: FP-pack – Functional pipelines in TypeScript wit... by superlucky84 on Saturday January 03, 2026 @03:17PM (#46481079)
It’s definitely monad-adjacent.

The main difference is that SideEffect isn’t a compositional context — there’s no bind/flatMap, and composition intentionally stops once it appears. It’s meant as an explicit early-exit signal in pipe-first code, not a general computation container.

Re:Show HN: FP-pack – Functional pipelines in TypeScript wit... by epgui on Saturday January 03, 2026 @05:11PM (#46482232)
Is there any advantage whatsoever to this, as opposed to a proper monad? I’m not seeing it.

The point of monads is that they solve this exact category of problem in the simplest possible way.

Re:Show HN: FP-pack – Functional pipelines in TypeScript wit... by superlucky84 on Saturday January 03, 2026 @05:18PM (#46482300)
One more practical point is that a full monad doesn’t fit very naturally into a pipe-first interface.

Once you commit to a real monad, you need map/flatMap, lifting, unwrapping, and rules about staying inside the context across the whole pipeline. At that point, the pipe abstraction stops being the primary mental model — the monad does.

SideEffect deliberately avoids that. It keeps the pipe interface intact and only adds a single, explicit signal: “stop here”. That’s why it’s less powerful than a monad, but also much simpler to integrate into existing pipe-based code.

Re:Show HN: FP-pack – Functional pipelines in TypeScript wit... by superlucky84 on Saturday January 03, 2026 @05:22PM (#46482334)
fp-pack is also intentionally scoped for everyday frontend developers.

It tries to borrow function composition and declarative structure without requiring familiarity with full FP abstractions like monads or effect systems.