Skip to content

flow

flow<A, B>(ab): (…a) => B

Defined in: Composition/flow.ts:37

Composes functions from left to right, returning a new function. Unlike pipe, flow doesn’t take an initial value - it creates a reusable pipeline that can be called later with arguments.

Use flow when you want to create a named, reusable transformation. Use pipe when you want to immediately transform a value.

A extends readonly unknown[]

B

(…a) => B

(…a): B

A

B

// Create a reusable transformation
const processUser = flow(
  (user: User) => user.name,
  name => name.toUpperCase(),
  name => `Hello, ${name}!`
);

processUser({ name: "Alice" }); // "Hello, ALICE!"
processUser({ name: "Bob" }); // "Hello, BOB!"

// Compare with pipe (one-time use):
pipe(
  user,
  u => u.name,
  name => name.toUpperCase()
);

// flow creates a function, pipe applies immediately:
const double = flow((n: number) => n * 2);
double(5); // 10

pipe(5, n => n * 2); // 10 (immediate result)

pipe for immediate value transformation

flow<A, B, C>(ab, bc): (…a) => C

Defined in: Composition/flow.ts:40

Composes functions from left to right, returning a new function. Unlike pipe, flow doesn’t take an initial value - it creates a reusable pipeline that can be called later with arguments.

Use flow when you want to create a named, reusable transformation. Use pipe when you want to immediately transform a value.

A extends readonly unknown[]

B

C

(…a) => B

(b) => C

(…a): C

A

C

// Create a reusable transformation
const processUser = flow(
  (user: User) => user.name,
  name => name.toUpperCase(),
  name => `Hello, ${name}!`
);

processUser({ name: "Alice" }); // "Hello, ALICE!"
processUser({ name: "Bob" }); // "Hello, BOB!"

// Compare with pipe (one-time use):
pipe(
  user,
  u => u.name,
  name => name.toUpperCase()
);

// flow creates a function, pipe applies immediately:
const double = flow((n: number) => n * 2);
double(5); // 10

pipe(5, n => n * 2); // 10 (immediate result)

pipe for immediate value transformation

flow<A, B, C, D>(ab, bc, cd): (…a) => D

Defined in: Composition/flow.ts:44

Composes functions from left to right, returning a new function. Unlike pipe, flow doesn’t take an initial value - it creates a reusable pipeline that can be called later with arguments.

Use flow when you want to create a named, reusable transformation. Use pipe when you want to immediately transform a value.

A extends readonly unknown[]

B

C

D

(…a) => B

(b) => C

(c) => D

(…a): D

A

D

// Create a reusable transformation
const processUser = flow(
  (user: User) => user.name,
  name => name.toUpperCase(),
  name => `Hello, ${name}!`
);

processUser({ name: "Alice" }); // "Hello, ALICE!"
processUser({ name: "Bob" }); // "Hello, BOB!"

// Compare with pipe (one-time use):
pipe(
  user,
  u => u.name,
  name => name.toUpperCase()
);

// flow creates a function, pipe applies immediately:
const double = flow((n: number) => n * 2);
double(5); // 10

pipe(5, n => n * 2); // 10 (immediate result)

pipe for immediate value transformation

flow<A, B, C, D, E>(ab, bc, cd, de): (…a) => E

Defined in: Composition/flow.ts:49

Composes functions from left to right, returning a new function. Unlike pipe, flow doesn’t take an initial value - it creates a reusable pipeline that can be called later with arguments.

Use flow when you want to create a named, reusable transformation. Use pipe when you want to immediately transform a value.

A extends readonly unknown[]

B

C

D

E

(…a) => B

(b) => C

(c) => D

(d) => E

(…a): E

A

E

// Create a reusable transformation
const processUser = flow(
  (user: User) => user.name,
  name => name.toUpperCase(),
  name => `Hello, ${name}!`
);

processUser({ name: "Alice" }); // "Hello, ALICE!"
processUser({ name: "Bob" }); // "Hello, BOB!"

// Compare with pipe (one-time use):
pipe(
  user,
  u => u.name,
  name => name.toUpperCase()
);

// flow creates a function, pipe applies immediately:
const double = flow((n: number) => n * 2);
double(5); // 10

pipe(5, n => n * 2); // 10 (immediate result)

pipe for immediate value transformation

flow<A, B, C, D, E, F>(ab, bc, cd, de, ef): (…a) => F

Defined in: Composition/flow.ts:55

Composes functions from left to right, returning a new function. Unlike pipe, flow doesn’t take an initial value - it creates a reusable pipeline that can be called later with arguments.

Use flow when you want to create a named, reusable transformation. Use pipe when you want to immediately transform a value.

A extends readonly unknown[]

B

C

D

E

F

(…a) => B

(b) => C

(c) => D

(d) => E

(e) => F

(…a): F

A

F

// Create a reusable transformation
const processUser = flow(
  (user: User) => user.name,
  name => name.toUpperCase(),
  name => `Hello, ${name}!`
);

processUser({ name: "Alice" }); // "Hello, ALICE!"
processUser({ name: "Bob" }); // "Hello, BOB!"

// Compare with pipe (one-time use):
pipe(
  user,
  u => u.name,
  name => name.toUpperCase()
);

// flow creates a function, pipe applies immediately:
const double = flow((n: number) => n * 2);
double(5); // 10

pipe(5, n => n * 2); // 10 (immediate result)

pipe for immediate value transformation

flow<A, B, C, D, E, F, G>(ab, bc, cd, de, ef, fg): (…a) => G

Defined in: Composition/flow.ts:62

Composes functions from left to right, returning a new function. Unlike pipe, flow doesn’t take an initial value - it creates a reusable pipeline that can be called later with arguments.

Use flow when you want to create a named, reusable transformation. Use pipe when you want to immediately transform a value.

A extends readonly unknown[]

B

C

D

E

F

G

(…a) => B

(b) => C

(c) => D

(d) => E

(e) => F

(f) => G

(…a): G

A

G

// Create a reusable transformation
const processUser = flow(
  (user: User) => user.name,
  name => name.toUpperCase(),
  name => `Hello, ${name}!`
);

processUser({ name: "Alice" }); // "Hello, ALICE!"
processUser({ name: "Bob" }); // "Hello, BOB!"

// Compare with pipe (one-time use):
pipe(
  user,
  u => u.name,
  name => name.toUpperCase()
);

// flow creates a function, pipe applies immediately:
const double = flow((n: number) => n * 2);
double(5); // 10

pipe(5, n => n * 2); // 10 (immediate result)

pipe for immediate value transformation

flow<A, B, C, D, E, F, G, H>(ab, bc, cd, de, ef, fg, gh): (…a) => H

Defined in: Composition/flow.ts:70

Composes functions from left to right, returning a new function. Unlike pipe, flow doesn’t take an initial value - it creates a reusable pipeline that can be called later with arguments.

Use flow when you want to create a named, reusable transformation. Use pipe when you want to immediately transform a value.

A extends readonly unknown[]

B

C

D

E

F

G

H

(…a) => B

(b) => C

(c) => D

(d) => E

(e) => F

(f) => G

(g) => H

(…a): H

A

H

// Create a reusable transformation
const processUser = flow(
  (user: User) => user.name,
  name => name.toUpperCase(),
  name => `Hello, ${name}!`
);

processUser({ name: "Alice" }); // "Hello, ALICE!"
processUser({ name: "Bob" }); // "Hello, BOB!"

// Compare with pipe (one-time use):
pipe(
  user,
  u => u.name,
  name => name.toUpperCase()
);

// flow creates a function, pipe applies immediately:
const double = flow((n: number) => n * 2);
double(5); // 10

pipe(5, n => n * 2); // 10 (immediate result)

pipe for immediate value transformation

flow<A, B, C, D, E, F, G, H, I>(ab, bc, cd, de, ef, fg, gh, hi): (…a) => I

Defined in: Composition/flow.ts:79

Composes functions from left to right, returning a new function. Unlike pipe, flow doesn’t take an initial value - it creates a reusable pipeline that can be called later with arguments.

Use flow when you want to create a named, reusable transformation. Use pipe when you want to immediately transform a value.

A extends readonly unknown[]

B

C

D

E

F

G

H

I

(…a) => B

(b) => C

(c) => D

(d) => E

(e) => F

(f) => G

(g) => H

(h) => I

(…a): I

A

I

// Create a reusable transformation
const processUser = flow(
  (user: User) => user.name,
  name => name.toUpperCase(),
  name => `Hello, ${name}!`
);

processUser({ name: "Alice" }); // "Hello, ALICE!"
processUser({ name: "Bob" }); // "Hello, BOB!"

// Compare with pipe (one-time use):
pipe(
  user,
  u => u.name,
  name => name.toUpperCase()
);

// flow creates a function, pipe applies immediately:
const double = flow((n: number) => n * 2);
double(5); // 10

pipe(5, n => n * 2); // 10 (immediate result)

pipe for immediate value transformation

flow<A, B, C, D, E, F, G, H, I, J>(ab, bc, cd, de, ef, fg, gh, hi, ij): (…a) => J

Defined in: Composition/flow.ts:89

Composes functions from left to right, returning a new function. Unlike pipe, flow doesn’t take an initial value - it creates a reusable pipeline that can be called later with arguments.

Use flow when you want to create a named, reusable transformation. Use pipe when you want to immediately transform a value.

A extends readonly unknown[]

B

C

D

E

F

G

H

I

J

(…a) => B

(b) => C

(c) => D

(d) => E

(e) => F

(f) => G

(g) => H

(h) => I

(i) => J

(…a): J

A

J

// Create a reusable transformation
const processUser = flow(
  (user: User) => user.name,
  name => name.toUpperCase(),
  name => `Hello, ${name}!`
);

processUser({ name: "Alice" }); // "Hello, ALICE!"
processUser({ name: "Bob" }); // "Hello, BOB!"

// Compare with pipe (one-time use):
pipe(
  user,
  u => u.name,
  name => name.toUpperCase()
);

// flow creates a function, pipe applies immediately:
const double = flow((n: number) => n * 2);
double(5); // 10

pipe(5, n => n * 2); // 10 (immediate result)

pipe for immediate value transformation

flow<A, B, C, D, E, F, G, H, I, J, K>(ab, bc, cd, de, ef, fg, gh, hi, ij, jk): (…a) => K

Defined in: Composition/flow.ts:111

Composes functions from left to right, returning a new function. Unlike pipe, flow doesn’t take an initial value - it creates a reusable pipeline that can be called later with arguments.

Use flow when you want to create a named, reusable transformation. Use pipe when you want to immediately transform a value.

A extends readonly unknown[]

B

C

D

E

F

G

H

I

J

K

(…a) => B

(b) => C

(c) => D

(d) => E

(e) => F

(f) => G

(g) => H

(h) => I

(i) => J

(j) => K

(…a): K

A

K

// Create a reusable transformation
const processUser = flow(
  (user: User) => user.name,
  name => name.toUpperCase(),
  name => `Hello, ${name}!`
);

processUser({ name: "Alice" }); // "Hello, ALICE!"
processUser({ name: "Bob" }); // "Hello, BOB!"

// Compare with pipe (one-time use):
pipe(
  user,
  u => u.name,
  name => name.toUpperCase()
);

// flow creates a function, pipe applies immediately:
const double = flow((n: number) => n * 2);
double(5); // 10

pipe(5, n => n * 2); // 10 (immediate result)

pipe for immediate value transformation

flow<A, B, C, D, E, F, G, H, I, J, K, L>(ab, bc, cd, de, ef, fg, gh, hi, ij, jk, kl): (…a) => L

Defined in: Composition/flow.ts:135

Composes functions from left to right, returning a new function. Unlike pipe, flow doesn’t take an initial value - it creates a reusable pipeline that can be called later with arguments.

Use flow when you want to create a named, reusable transformation. Use pipe when you want to immediately transform a value.

A extends readonly unknown[]

B

C

D

E

F

G

H

I

J

K

L

(…a) => B

(b) => C

(c) => D

(d) => E

(e) => F

(f) => G

(g) => H

(h) => I

(i) => J

(j) => K

(k) => L

(…a): L

A

L

// Create a reusable transformation
const processUser = flow(
  (user: User) => user.name,
  name => name.toUpperCase(),
  name => `Hello, ${name}!`
);

processUser({ name: "Alice" }); // "Hello, ALICE!"
processUser({ name: "Bob" }); // "Hello, BOB!"

// Compare with pipe (one-time use):
pipe(
  user,
  u => u.name,
  name => name.toUpperCase()
);

// flow creates a function, pipe applies immediately:
const double = flow((n: number) => n * 2);
double(5); // 10

pipe(5, n => n * 2); // 10 (immediate result)

pipe for immediate value transformation

flow<A, B, C, D, E, F, G, H, I, J, K, L, M>(ab, bc, cd, de, ef, fg, gh, hi, ij, jk, kl, lm): (…a) => M

Defined in: Composition/flow.ts:161

Composes functions from left to right, returning a new function. Unlike pipe, flow doesn’t take an initial value - it creates a reusable pipeline that can be called later with arguments.

Use flow when you want to create a named, reusable transformation. Use pipe when you want to immediately transform a value.

A extends readonly unknown[]

B

C

D

E

F

G

H

I

J

K

L

M

(…a) => B

(b) => C

(c) => D

(d) => E

(e) => F

(f) => G

(g) => H

(h) => I

(i) => J

(j) => K

(k) => L

(l) => M

(…a): M

A

M

// Create a reusable transformation
const processUser = flow(
  (user: User) => user.name,
  name => name.toUpperCase(),
  name => `Hello, ${name}!`
);

processUser({ name: "Alice" }); // "Hello, ALICE!"
processUser({ name: "Bob" }); // "Hello, BOB!"

// Compare with pipe (one-time use):
pipe(
  user,
  u => u.name,
  name => name.toUpperCase()
);

// flow creates a function, pipe applies immediately:
const double = flow((n: number) => n * 2);
double(5); // 10

pipe(5, n => n * 2); // 10 (immediate result)

pipe for immediate value transformation

flow<A, B, C, D, E, F, G, H, I, J, K, L, M, N>(ab, bc, cd, de, ef, fg, gh, hi, ij, jk, kl, lm, mn): (…a) => N

Defined in: Composition/flow.ts:189

Composes functions from left to right, returning a new function. Unlike pipe, flow doesn’t take an initial value - it creates a reusable pipeline that can be called later with arguments.

Use flow when you want to create a named, reusable transformation. Use pipe when you want to immediately transform a value.

A extends readonly unknown[]

B

C

D

E

F

G

H

I

J

K

L

M

N

(…a) => B

(b) => C

(c) => D

(d) => E

(e) => F

(f) => G

(g) => H

(h) => I

(i) => J

(j) => K

(k) => L

(l) => M

(m) => N

(…a): N

A

N

// Create a reusable transformation
const processUser = flow(
  (user: User) => user.name,
  name => name.toUpperCase(),
  name => `Hello, ${name}!`
);

processUser({ name: "Alice" }); // "Hello, ALICE!"
processUser({ name: "Bob" }); // "Hello, BOB!"

// Compare with pipe (one-time use):
pipe(
  user,
  u => u.name,
  name => name.toUpperCase()
);

// flow creates a function, pipe applies immediately:
const double = flow((n: number) => n * 2);
double(5); // 10

pipe(5, n => n * 2); // 10 (immediate result)

pipe for immediate value transformation

flow<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O>(ab, bc, cd, de, ef, fg, gh, hi, ij, jk, kl, lm, mn, no): (…a) => O

Defined in: Composition/flow.ts:219

Composes functions from left to right, returning a new function. Unlike pipe, flow doesn’t take an initial value - it creates a reusable pipeline that can be called later with arguments.

Use flow when you want to create a named, reusable transformation. Use pipe when you want to immediately transform a value.

A extends readonly unknown[]

B

C

D

E

F

G

H

I

J

K

L

M

N

O

(…a) => B

(b) => C

(c) => D

(d) => E

(e) => F

(f) => G

(g) => H

(h) => I

(i) => J

(j) => K

(k) => L

(l) => M

(m) => N

(n) => O

(…a): O

A

O

// Create a reusable transformation
const processUser = flow(
  (user: User) => user.name,
  name => name.toUpperCase(),
  name => `Hello, ${name}!`
);

processUser({ name: "Alice" }); // "Hello, ALICE!"
processUser({ name: "Bob" }); // "Hello, BOB!"

// Compare with pipe (one-time use):
pipe(
  user,
  u => u.name,
  name => name.toUpperCase()
);

// flow creates a function, pipe applies immediately:
const double = flow((n: number) => n * 2);
double(5); // 10

pipe(5, n => n * 2); // 10 (immediate result)

pipe for immediate value transformation

flow<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P>(ab, bc, cd, de, ef, fg, gh, hi, ij, jk, kl, lm, mn, no, op): (…a) => P

Defined in: Composition/flow.ts:251

Composes functions from left to right, returning a new function. Unlike pipe, flow doesn’t take an initial value - it creates a reusable pipeline that can be called later with arguments.

Use flow when you want to create a named, reusable transformation. Use pipe when you want to immediately transform a value.

A extends readonly unknown[]

B

C

D

E

F

G

H

I

J

K

L

M

N

O

P

(…a) => B

(b) => C

(c) => D

(d) => E

(e) => F

(f) => G

(g) => H

(h) => I

(i) => J

(j) => K

(k) => L

(l) => M

(m) => N

(n) => O

(o) => P

(…a): P

A

P

// Create a reusable transformation
const processUser = flow(
  (user: User) => user.name,
  name => name.toUpperCase(),
  name => `Hello, ${name}!`
);

processUser({ name: "Alice" }); // "Hello, ALICE!"
processUser({ name: "Bob" }); // "Hello, BOB!"

// Compare with pipe (one-time use):
pipe(
  user,
  u => u.name,
  name => name.toUpperCase()
);

// flow creates a function, pipe applies immediately:
const double = flow((n: number) => n * 2);
double(5); // 10

pipe(5, n => n * 2); // 10 (immediate result)

pipe for immediate value transformation

flow<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q>(ab, bc, cd, de, ef, fg, gh, hi, ij, jk, kl, lm, mn, no, op, pq): (…a) => Q

Defined in: Composition/flow.ts:285

Composes functions from left to right, returning a new function. Unlike pipe, flow doesn’t take an initial value - it creates a reusable pipeline that can be called later with arguments.

Use flow when you want to create a named, reusable transformation. Use pipe when you want to immediately transform a value.

A extends readonly unknown[]

B

C

D

E

F

G

H

I

J

K

L

M

N

O

P

Q

(…a) => B

(b) => C

(c) => D

(d) => E

(e) => F

(f) => G

(g) => H

(h) => I

(i) => J

(j) => K

(k) => L

(l) => M

(m) => N

(n) => O

(o) => P

(p) => Q

(…a): Q

A

Q

// Create a reusable transformation
const processUser = flow(
  (user: User) => user.name,
  name => name.toUpperCase(),
  name => `Hello, ${name}!`
);

processUser({ name: "Alice" }); // "Hello, ALICE!"
processUser({ name: "Bob" }); // "Hello, BOB!"

// Compare with pipe (one-time use):
pipe(
  user,
  u => u.name,
  name => name.toUpperCase()
);

// flow creates a function, pipe applies immediately:
const double = flow((n: number) => n * 2);
double(5); // 10

pipe(5, n => n * 2); // 10 (immediate result)

pipe for immediate value transformation

flow<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R>(ab, bc, cd, de, ef, fg, gh, hi, ij, jk, kl, lm, mn, no, op, pq, qr): (…a) => R

Defined in: Composition/flow.ts:321

Composes functions from left to right, returning a new function. Unlike pipe, flow doesn’t take an initial value - it creates a reusable pipeline that can be called later with arguments.

Use flow when you want to create a named, reusable transformation. Use pipe when you want to immediately transform a value.

A extends readonly unknown[]

B

C

D

E

F

G

H

I

J

K

L

M

N

O

P

Q

R

(…a) => B

(b) => C

(c) => D

(d) => E

(e) => F

(f) => G

(g) => H

(h) => I

(i) => J

(j) => K

(k) => L

(l) => M

(m) => N

(n) => O

(o) => P

(p) => Q

(q) => R

(…a): R

A

R

// Create a reusable transformation
const processUser = flow(
  (user: User) => user.name,
  name => name.toUpperCase(),
  name => `Hello, ${name}!`
);

processUser({ name: "Alice" }); // "Hello, ALICE!"
processUser({ name: "Bob" }); // "Hello, BOB!"

// Compare with pipe (one-time use):
pipe(
  user,
  u => u.name,
  name => name.toUpperCase()
);

// flow creates a function, pipe applies immediately:
const double = flow((n: number) => n * 2);
double(5); // 10

pipe(5, n => n * 2); // 10 (immediate result)

pipe for immediate value transformation

flow<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S>(ab, bc, cd, de, ef, fg, gh, hi, ij, jk, kl, lm, mn, no, op, pq, qr, rs): (…a) => S

Defined in: Composition/flow.ts:359

Composes functions from left to right, returning a new function. Unlike pipe, flow doesn’t take an initial value - it creates a reusable pipeline that can be called later with arguments.

Use flow when you want to create a named, reusable transformation. Use pipe when you want to immediately transform a value.

A extends readonly unknown[]

B

C

D

E

F

G

H

I

J

K

L

M

N

O

P

Q

R

S

(…a) => B

(b) => C

(c) => D

(d) => E

(e) => F

(f) => G

(g) => H

(h) => I

(i) => J

(j) => K

(k) => L

(l) => M

(m) => N

(n) => O

(o) => P

(p) => Q

(q) => R

(r) => S

(…a): S

A

S

// Create a reusable transformation
const processUser = flow(
  (user: User) => user.name,
  name => name.toUpperCase(),
  name => `Hello, ${name}!`
);

processUser({ name: "Alice" }); // "Hello, ALICE!"
processUser({ name: "Bob" }); // "Hello, BOB!"

// Compare with pipe (one-time use):
pipe(
  user,
  u => u.name,
  name => name.toUpperCase()
);

// flow creates a function, pipe applies immediately:
const double = flow((n: number) => n * 2);
double(5); // 10

pipe(5, n => n * 2); // 10 (immediate result)

pipe for immediate value transformation

flow<A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T>(ab, bc, cd, de, ef, fg, gh, hi, ij, jk, kl, lm, mn, no, op, pq, qr, rs, st): (…a) => T

Defined in: Composition/flow.ts:399

Composes functions from left to right, returning a new function. Unlike pipe, flow doesn’t take an initial value - it creates a reusable pipeline that can be called later with arguments.

Use flow when you want to create a named, reusable transformation. Use pipe when you want to immediately transform a value.

A extends readonly unknown[]

B

C

D

E

F

G

H

I

J

K

L

M

N

O

P

Q

R

S

T

(…a) => B

(b) => C

(c) => D

(d) => E

(e) => F

(f) => G

(g) => H

(h) => I

(i) => J

(j) => K

(k) => L

(l) => M

(m) => N

(n) => O

(o) => P

(p) => Q

(q) => R

(r) => S

(s) => T

(…a): T

A

T

// Create a reusable transformation
const processUser = flow(
  (user: User) => user.name,
  name => name.toUpperCase(),
  name => `Hello, ${name}!`
);

processUser({ name: "Alice" }); // "Hello, ALICE!"
processUser({ name: "Bob" }); // "Hello, BOB!"

// Compare with pipe (one-time use):
pipe(
  user,
  u => u.name,
  name => name.toUpperCase()
);

// flow creates a function, pipe applies immediately:
const double = flow((n: number) => n * 2);
double(5); // 10

pipe(5, n => n * 2); // 10 (immediate result)

pipe for immediate value transformation