| name | fp-pipe-ref |
| description | ALWAYS use this when the user mentions FP Pipe REF, asks to build, debug, review, document, automate, test, configure, migrate, or make decisions in this domain, or the task clearly depends on FP Pipe REF; scope: Quick reference for pipe and flow. Apply the bundled workflow, references, scripts, Senior Master standard, and Codex strict review gate before final output. |
pipe & flow Quick Reference
Selective Reading Rule
Start with:
references/senior-master-standard.md
references/usage-routing.md
references/quality-checklist.md
Then load only the inherited docs, scripts, assets, or examples that match the user's actual task.
pipe - Transform a Value
import { pipe } from 'fp-ts/function'
const result = pipe(
' hello world ',
s => s.trim(),
s => s.toUpperCase(),
s => s.split(' ')
)
flow - Create Reusable Pipeline
import { flow } from 'fp-ts/function'
const process = flow(
(s: string) => s.trim(),
s => s.toUpperCase(),
s => s.split(' ')
)
process(' hello world ')
process(' foo bar ')
When to Use
| Use | When |
|---|
pipe | Transform a specific value now |
flow | Create reusable transformation |
With fp-ts Types
import * as O from 'fp-ts/Option'
import * as A from 'fp-ts/Array'
pipe(
O.fromNullable(user),
O.map(u => u.email),
O.getOrElse(() => 'no email')
)
pipe(
users,
A.filter(u => u.active),
A.map(u => u.name)
)
Common Pattern
const getActiveNames = flow(
A.filter((u: User) => u.active),
A.map(u => u.name)
)
getActiveNames(users1)
getActiveNames(users2)
Limitations
- Use this skill only when the task clearly matches the scope described above.
- Do not treat the output as a substitute for environment-specific validation, testing, or expert review.
- Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.