fp-ts Pipe and Flow Composition

Compose type-safe pipelines in TypeScript using fp-ts pipe and flow.

11|3|Updated Jan 30, 2026
One-click install
npx skills add https://github.com/whatiskadudoing/fp-ts-skills --skill fp-ts-pipe-and-flow-composition
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: fp-ts Pipe and Flow Composition
Source: https://github.com/whatiskadudoing/fp-ts-skills/tree/main/skills/fp-pipe-flow
Command: npx skills add https://github.com/whatiskadudoing/fp-ts-skills --skill fp-ts-pipe-and-flow-composition

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps developers compose transformations in TypeScript using fp-ts by teaching how to combine pipe and flow to build readable, reusable pipelines.

Core Features & Use Cases

  • Immediate value transformations with pipe to apply a series of functions to a value
  • Reusable pipelines with flow to create composable, testable transforms
  • Interoperability with common fp-ts data types (Option, Either, Task, Array) to manage effects and errors
  • Real-world scenario: build a data-processing pipeline that filters, maps, and formats results

Quick Start

Use fp-ts pipe and flow to create a simple transformation. Example: const nums = [1, 2, 3, 4] const result = pipe( nums, A.filter(n => n > 1), A.map(n => n * 2) )

Frequently Asked Questions about fp-ts Pipe and Flow Composition

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I build type-safe data transformation pipelines in TypeScript?

Type-safe data transformation pipelines in TypeScript are built using fp-ts pipe and flow to sequentially apply functions to values. This approach ensures type inference is maintained throughout the pipeline, creating readable and testable data processing transforms.

What is the difference between pipe and flow in fp-ts?

Pipe applies a series of functions directly to an immediate input value, while flow creates a reusable, composable function pipeline without an initial input. Both establish type-safe functional composition for data transformations in TypeScript.

How do I use fp-ts pipe with Option and Either data types?

Pipe integrates with fp-ts Option and Either data types to manage effects and errors within functional pipelines. You pass the data type instance into pipe and chain operations like map or chain to safely handle optional values and error branches.

Can I use fp-ts flow for UI state management and backend data processing?

Flow is suitable for both UI state management and backend data processing in TypeScript. It creates reusable transform pipelines that filter, map, and format results across front-end apps and backend services.

Why does TypeScript type inference fail in my fp-ts pipe composition?

TypeScript type inference fails in fp-ts pipe composition when generic parameters are not properly inferred across sequential operations. Providing explicit type arguments to functions within the pipe or flow pipeline restores correct type inference guidance.