carbonteq /FP

Overview

Cheatsheet-first API docs for @carbonteq/fp (Option + Result).

This section documents the public API of @carbonteq/fp:

  • Option<T> and Result<T, E>
  • matchOpt, matchRes
  • Operator-style methods (map/flatMap/zip/flatZip/etc.)

How these docs are organized

  • Cheatsheets: compact tables (what it does + short example). When an operator exists on both Option and Result, it is documented once with two signatures if needed.
  • Recipes: end-to-end patterns (pipelines, validation, async boundaries).

What we intentionally omit

  • We do not document UNIT as a public concept. You may see methods like isUnit() and UNIT_RESULT; those are documented where relevant, but UNIT itself is not.

On this page