-
-
Notifications
You must be signed in to change notification settings - Fork 130
Open
Labels
documentationImprovements or additions to documentationImprovements or additions to documentation
Description
What is the type of issue?
No response
What is the issue?
The pipelines documentation is decent, but I immediately started to think about how I could combine operations. Like: let's say I take the documentation example of
import { pipe } from "effect"
// Define simple arithmetic operations
const increment = (x: number) => x + 1
const double = (x: number) => x * 2
const subtractTen = (x: number) => x - 10
// Sequentially apply these operations using `pipe`
const result = pipe(5, increment, double, subtractTen)
console.log(result)
// Output: 2And I want to create a method that's like incrementDoubleAndSubtractTen.
The naive implementation would be
const incrementDoubleAndSubtractTen = pipe(increment, double, subtractTen)But this doesn't typecheck. The correct solution would be
const incrementDoubleAndSubtractTen = flow(increment, double, subtractTen)But the flow() method isn't mentioned in these docs or afaict anywhere else in the docs.
Where did you find it?
https://effect.website/docs/getting-started/building-pipelines/
Metadata
Metadata
Assignees
Labels
documentationImprovements or additions to documentationImprovements or additions to documentation