Skip to content

pipe

pipe<A>(a): A

Defined in: Composition/pipe.ts:36

Pipes a value through a series of functions from left to right. Each function receives the output of the previous function.

pipe is the primary way to compose operations in this library. It makes code read top-to-bottom, left-to-right, which is more intuitive for developers coming from imperative backgrounds.

A

A

A

// Basic usage
const result = pipe(
  5,
  n => n * 2,
  n => n + 1
); // 11

// With library functions
const greeting = pipe(
  Option.of("Alice"),
  Option.map(name => name.toUpperCase()),
  Option.map(name => `Hello, ${name}!`),
  Option.getOrElse("Hello!")
); // "Hello, ALICE!"

// Error handling with Result
const result = pipe(
  Result.tryCatch(() => JSON.parse(input), e => "Invalid JSON"),
  Result.map(data => data.value),
  Result.getOrElse(null)
);

flow for creating reusable pipelines without an initial value

pipe<A, B>(a, ab): B

Defined in: Composition/pipe.ts:37

Pipes a value through a series of functions from left to right. Each function receives the output of the previous function.

pipe is the primary way to compose operations in this library. It makes code read top-to-bottom, left-to-right, which is more intuitive for developers coming from imperative backgrounds.

A

B

A

(a) => B

B

// Basic usage
const result = pipe(
  5,
  n => n * 2,
  n => n + 1
); // 11

// With library functions
const greeting = pipe(
  Option.of("Alice"),
  Option.map(name => name.toUpperCase()),
  Option.map(name => `Hello, ${name}!`),
  Option.getOrElse("Hello!")
); // "Hello, ALICE!"

// Error handling with Result
const result = pipe(
  Result.tryCatch(() => JSON.parse(input), e => "Invalid JSON"),
  Result.map(data => data.value),
  Result.getOrElse(null)
);

flow for creating reusable pipelines without an initial value

pipe<A, B, C>(a, ab, bc): C

Defined in: Composition/pipe.ts:38

Pipes a value through a series of functions from left to right. Each function receives the output of the previous function.

pipe is the primary way to compose operations in this library. It makes code read top-to-bottom, left-to-right, which is more intuitive for developers coming from imperative backgrounds.

A

B

C

A

(a) => B

(b) => C

C

// Basic usage
const result = pipe(
  5,
  n => n * 2,
  n => n + 1
); // 11

// With library functions
const greeting = pipe(
  Option.of("Alice"),
  Option.map(name => name.toUpperCase()),
  Option.map(name => `Hello, ${name}!`),
  Option.getOrElse("Hello!")
); // "Hello, ALICE!"

// Error handling with Result
const result = pipe(
  Result.tryCatch(() => JSON.parse(input), e => "Invalid JSON"),
  Result.map(data => data.value),
  Result.getOrElse(null)
);

flow for creating reusable pipelines without an initial value

pipe<A, B, C, D>(a, ab, bc, cd): D

Defined in: Composition/pipe.ts:39

Pipes a value through a series of functions from left to right. Each function receives the output of the previous function.

pipe is the primary way to compose operations in this library. It makes code read top-to-bottom, left-to-right, which is more intuitive for developers coming from imperative backgrounds.

A

B

C

D

A

(a) => B

(b) => C

(c) => D

D

// Basic usage
const result = pipe(
  5,
  n => n * 2,
  n => n + 1
); // 11

// With library functions
const greeting = pipe(
  Option.of("Alice"),
  Option.map(name => name.toUpperCase()),
  Option.map(name => `Hello, ${name}!`),
  Option.getOrElse("Hello!")
); // "Hello, ALICE!"

// Error handling with Result
const result = pipe(
  Result.tryCatch(() => JSON.parse(input), e => "Invalid JSON"),
  Result.map(data => data.value),
  Result.getOrElse(null)
);

flow for creating reusable pipelines without an initial value

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

Defined in: Composition/pipe.ts:45

Pipes a value through a series of functions from left to right. Each function receives the output of the previous function.

pipe is the primary way to compose operations in this library. It makes code read top-to-bottom, left-to-right, which is more intuitive for developers coming from imperative backgrounds.

A

B

C

D

E

A

(a) => B

(b) => C

(c) => D

(d) => E

E

// Basic usage
const result = pipe(
  5,
  n => n * 2,
  n => n + 1
); // 11

// With library functions
const greeting = pipe(
  Option.of("Alice"),
  Option.map(name => name.toUpperCase()),
  Option.map(name => `Hello, ${name}!`),
  Option.getOrElse("Hello!")
); // "Hello, ALICE!"

// Error handling with Result
const result = pipe(
  Result.tryCatch(() => JSON.parse(input), e => "Invalid JSON"),
  Result.map(data => data.value),
  Result.getOrElse(null)
);

flow for creating reusable pipelines without an initial value

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

Defined in: Composition/pipe.ts:52

Pipes a value through a series of functions from left to right. Each function receives the output of the previous function.

pipe is the primary way to compose operations in this library. It makes code read top-to-bottom, left-to-right, which is more intuitive for developers coming from imperative backgrounds.

A

B

C

D

E

F

A

(a) => B

(b) => C

(c) => D

(d) => E

(e) => F

F

// Basic usage
const result = pipe(
  5,
  n => n * 2,
  n => n + 1
); // 11

// With library functions
const greeting = pipe(
  Option.of("Alice"),
  Option.map(name => name.toUpperCase()),
  Option.map(name => `Hello, ${name}!`),
  Option.getOrElse("Hello!")
); // "Hello, ALICE!"

// Error handling with Result
const result = pipe(
  Result.tryCatch(() => JSON.parse(input), e => "Invalid JSON"),
  Result.map(data => data.value),
  Result.getOrElse(null)
);

flow for creating reusable pipelines without an initial value

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

Defined in: Composition/pipe.ts:60

Pipes a value through a series of functions from left to right. Each function receives the output of the previous function.

pipe is the primary way to compose operations in this library. It makes code read top-to-bottom, left-to-right, which is more intuitive for developers coming from imperative backgrounds.

A

B

C

D

E

F

G

A

(a) => B

(b) => C

(c) => D

(d) => E

(e) => F

(f) => G

G

// Basic usage
const result = pipe(
  5,
  n => n * 2,
  n => n + 1
); // 11

// With library functions
const greeting = pipe(
  Option.of("Alice"),
  Option.map(name => name.toUpperCase()),
  Option.map(name => `Hello, ${name}!`),
  Option.getOrElse("Hello!")
); // "Hello, ALICE!"

// Error handling with Result
const result = pipe(
  Result.tryCatch(() => JSON.parse(input), e => "Invalid JSON"),
  Result.map(data => data.value),
  Result.getOrElse(null)
);

flow for creating reusable pipelines without an initial value

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

Defined in: Composition/pipe.ts:69

Pipes a value through a series of functions from left to right. Each function receives the output of the previous function.

pipe is the primary way to compose operations in this library. It makes code read top-to-bottom, left-to-right, which is more intuitive for developers coming from imperative backgrounds.

A

B

C

D

E

F

G

H

A

(a) => B

(b) => C

(c) => D

(d) => E

(e) => F

(f) => G

(g) => H

H

// Basic usage
const result = pipe(
  5,
  n => n * 2,
  n => n + 1
); // 11

// With library functions
const greeting = pipe(
  Option.of("Alice"),
  Option.map(name => name.toUpperCase()),
  Option.map(name => `Hello, ${name}!`),
  Option.getOrElse("Hello!")
); // "Hello, ALICE!"

// Error handling with Result
const result = pipe(
  Result.tryCatch(() => JSON.parse(input), e => "Invalid JSON"),
  Result.map(data => data.value),
  Result.getOrElse(null)
);

flow for creating reusable pipelines without an initial value

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

Defined in: Composition/pipe.ts:79

Pipes a value through a series of functions from left to right. Each function receives the output of the previous function.

pipe is the primary way to compose operations in this library. It makes code read top-to-bottom, left-to-right, which is more intuitive for developers coming from imperative backgrounds.

A

B

C

D

E

F

G

H

I

A

(a) => B

(b) => C

(c) => D

(d) => E

(e) => F

(f) => G

(g) => H

(h) => I

I

// Basic usage
const result = pipe(
  5,
  n => n * 2,
  n => n + 1
); // 11

// With library functions
const greeting = pipe(
  Option.of("Alice"),
  Option.map(name => name.toUpperCase()),
  Option.map(name => `Hello, ${name}!`),
  Option.getOrElse("Hello!")
); // "Hello, ALICE!"

// Error handling with Result
const result = pipe(
  Result.tryCatch(() => JSON.parse(input), e => "Invalid JSON"),
  Result.map(data => data.value),
  Result.getOrElse(null)
);

flow for creating reusable pipelines without an initial value

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

Defined in: Composition/pipe.ts:90

Pipes a value through a series of functions from left to right. Each function receives the output of the previous function.

pipe is the primary way to compose operations in this library. It makes code read top-to-bottom, left-to-right, which is more intuitive for developers coming from imperative backgrounds.

A

B

C

D

E

F

G

H

I

J

A

(a) => B

(b) => C

(c) => D

(d) => E

(e) => F

(f) => G

(g) => H

(h) => I

(i) => J

J

// Basic usage
const result = pipe(
  5,
  n => n * 2,
  n => n + 1
); // 11

// With library functions
const greeting = pipe(
  Option.of("Alice"),
  Option.map(name => name.toUpperCase()),
  Option.map(name => `Hello, ${name}!`),
  Option.getOrElse("Hello!")
); // "Hello, ALICE!"

// Error handling with Result
const result = pipe(
  Result.tryCatch(() => JSON.parse(input), e => "Invalid JSON"),
  Result.map(data => data.value),
  Result.getOrElse(null)
);

flow for creating reusable pipelines without an initial value

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

Defined in: Composition/pipe.ts:102

Pipes a value through a series of functions from left to right. Each function receives the output of the previous function.

pipe is the primary way to compose operations in this library. It makes code read top-to-bottom, left-to-right, which is more intuitive for developers coming from imperative backgrounds.

A

B

C

D

E

F

G

H

I

J

K

A

(a) => B

(b) => C

(c) => D

(d) => E

(e) => F

(f) => G

(g) => H

(h) => I

(i) => J

(j) => K

K

// Basic usage
const result = pipe(
  5,
  n => n * 2,
  n => n + 1
); // 11

// With library functions
const greeting = pipe(
  Option.of("Alice"),
  Option.map(name => name.toUpperCase()),
  Option.map(name => `Hello, ${name}!`),
  Option.getOrElse("Hello!")
); // "Hello, ALICE!"

// Error handling with Result
const result = pipe(
  Result.tryCatch(() => JSON.parse(input), e => "Invalid JSON"),
  Result.map(data => data.value),
  Result.getOrElse(null)
);

flow for creating reusable pipelines without an initial value

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

Defined in: Composition/pipe.ts:115

Pipes a value through a series of functions from left to right. Each function receives the output of the previous function.

pipe is the primary way to compose operations in this library. It makes code read top-to-bottom, left-to-right, which is more intuitive for developers coming from imperative backgrounds.

A

B

C

D

E

F

G

H

I

J

K

L

A

(a) => B

(b) => C

(c) => D

(d) => E

(e) => F

(f) => G

(g) => H

(h) => I

(i) => J

(j) => K

(k) => L

L

// Basic usage
const result = pipe(
  5,
  n => n * 2,
  n => n + 1
); // 11

// With library functions
const greeting = pipe(
  Option.of("Alice"),
  Option.map(name => name.toUpperCase()),
  Option.map(name => `Hello, ${name}!`),
  Option.getOrElse("Hello!")
); // "Hello, ALICE!"

// Error handling with Result
const result = pipe(
  Result.tryCatch(() => JSON.parse(input), e => "Invalid JSON"),
  Result.map(data => data.value),
  Result.getOrElse(null)
);

flow for creating reusable pipelines without an initial value

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

Defined in: Composition/pipe.ts:129

Pipes a value through a series of functions from left to right. Each function receives the output of the previous function.

pipe is the primary way to compose operations in this library. It makes code read top-to-bottom, left-to-right, which is more intuitive for developers coming from imperative backgrounds.

A

B

C

D

E

F

G

H

I

J

K

L

M

A

(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

// Basic usage
const result = pipe(
  5,
  n => n * 2,
  n => n + 1
); // 11

// With library functions
const greeting = pipe(
  Option.of("Alice"),
  Option.map(name => name.toUpperCase()),
  Option.map(name => `Hello, ${name}!`),
  Option.getOrElse("Hello!")
); // "Hello, ALICE!"

// Error handling with Result
const result = pipe(
  Result.tryCatch(() => JSON.parse(input), e => "Invalid JSON"),
  Result.map(data => data.value),
  Result.getOrElse(null)
);

flow for creating reusable pipelines without an initial value

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

Defined in: Composition/pipe.ts:144

Pipes a value through a series of functions from left to right. Each function receives the output of the previous function.

pipe is the primary way to compose operations in this library. It makes code read top-to-bottom, left-to-right, which is more intuitive for developers coming from imperative backgrounds.

A

B

C

D

E

F

G

H

I

J

K

L

M

N

A

(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

// Basic usage
const result = pipe(
  5,
  n => n * 2,
  n => n + 1
); // 11

// With library functions
const greeting = pipe(
  Option.of("Alice"),
  Option.map(name => name.toUpperCase()),
  Option.map(name => `Hello, ${name}!`),
  Option.getOrElse("Hello!")
); // "Hello, ALICE!"

// Error handling with Result
const result = pipe(
  Result.tryCatch(() => JSON.parse(input), e => "Invalid JSON"),
  Result.map(data => data.value),
  Result.getOrElse(null)
);

flow for creating reusable pipelines without an initial value

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

Defined in: Composition/pipe.ts:160

Pipes a value through a series of functions from left to right. Each function receives the output of the previous function.

pipe is the primary way to compose operations in this library. It makes code read top-to-bottom, left-to-right, which is more intuitive for developers coming from imperative backgrounds.

A

B

C

D

E

F

G

H

I

J

K

L

M

N

O

A

(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

// Basic usage
const result = pipe(
  5,
  n => n * 2,
  n => n + 1
); // 11

// With library functions
const greeting = pipe(
  Option.of("Alice"),
  Option.map(name => name.toUpperCase()),
  Option.map(name => `Hello, ${name}!`),
  Option.getOrElse("Hello!")
); // "Hello, ALICE!"

// Error handling with Result
const result = pipe(
  Result.tryCatch(() => JSON.parse(input), e => "Invalid JSON"),
  Result.map(data => data.value),
  Result.getOrElse(null)
);

flow for creating reusable pipelines without an initial value

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

Defined in: Composition/pipe.ts:177

Pipes a value through a series of functions from left to right. Each function receives the output of the previous function.

pipe is the primary way to compose operations in this library. It makes code read top-to-bottom, left-to-right, which is more intuitive for developers coming from imperative backgrounds.

A

B

C

D

E

F

G

H

I

J

K

L

M

N

O

P

A

(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

// Basic usage
const result = pipe(
  5,
  n => n * 2,
  n => n + 1
); // 11

// With library functions
const greeting = pipe(
  Option.of("Alice"),
  Option.map(name => name.toUpperCase()),
  Option.map(name => `Hello, ${name}!`),
  Option.getOrElse("Hello!")
); // "Hello, ALICE!"

// Error handling with Result
const result = pipe(
  Result.tryCatch(() => JSON.parse(input), e => "Invalid JSON"),
  Result.map(data => data.value),
  Result.getOrElse(null)
);

flow for creating reusable pipelines without an initial value

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

Defined in: Composition/pipe.ts:195

Pipes a value through a series of functions from left to right. Each function receives the output of the previous function.

pipe is the primary way to compose operations in this library. It makes code read top-to-bottom, left-to-right, which is more intuitive for developers coming from imperative backgrounds.

A

B

C

D

E

F

G

H

I

J

K

L

M

N

O

P

Q

A

(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

// Basic usage
const result = pipe(
  5,
  n => n * 2,
  n => n + 1
); // 11

// With library functions
const greeting = pipe(
  Option.of("Alice"),
  Option.map(name => name.toUpperCase()),
  Option.map(name => `Hello, ${name}!`),
  Option.getOrElse("Hello!")
); // "Hello, ALICE!"

// Error handling with Result
const result = pipe(
  Result.tryCatch(() => JSON.parse(input), e => "Invalid JSON"),
  Result.map(data => data.value),
  Result.getOrElse(null)
);

flow for creating reusable pipelines without an initial value

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

Defined in: Composition/pipe.ts:214

Pipes a value through a series of functions from left to right. Each function receives the output of the previous function.

pipe is the primary way to compose operations in this library. It makes code read top-to-bottom, left-to-right, which is more intuitive for developers coming from imperative backgrounds.

A

B

C

D

E

F

G

H

I

J

K

L

M

N

O

P

Q

R

A

(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

// Basic usage
const result = pipe(
  5,
  n => n * 2,
  n => n + 1
); // 11

// With library functions
const greeting = pipe(
  Option.of("Alice"),
  Option.map(name => name.toUpperCase()),
  Option.map(name => `Hello, ${name}!`),
  Option.getOrElse("Hello!")
); // "Hello, ALICE!"

// Error handling with Result
const result = pipe(
  Result.tryCatch(() => JSON.parse(input), e => "Invalid JSON"),
  Result.map(data => data.value),
  Result.getOrElse(null)
);

flow for creating reusable pipelines without an initial value

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

Defined in: Composition/pipe.ts:234

Pipes a value through a series of functions from left to right. Each function receives the output of the previous function.

pipe is the primary way to compose operations in this library. It makes code read top-to-bottom, left-to-right, which is more intuitive for developers coming from imperative backgrounds.

A

B

C

D

E

F

G

H

I

J

K

L

M

N

O

P

Q

R

S

A

(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

// Basic usage
const result = pipe(
  5,
  n => n * 2,
  n => n + 1
); // 11

// With library functions
const greeting = pipe(
  Option.of("Alice"),
  Option.map(name => name.toUpperCase()),
  Option.map(name => `Hello, ${name}!`),
  Option.getOrElse("Hello!")
); // "Hello, ALICE!"

// Error handling with Result
const result = pipe(
  Result.tryCatch(() => JSON.parse(input), e => "Invalid JSON"),
  Result.map(data => data.value),
  Result.getOrElse(null)
);

flow for creating reusable pipelines without an initial value

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

Defined in: Composition/pipe.ts:255

Pipes a value through a series of functions from left to right. Each function receives the output of the previous function.

pipe is the primary way to compose operations in this library. It makes code read top-to-bottom, left-to-right, which is more intuitive for developers coming from imperative backgrounds.

A

B

C

D

E

F

G

H

I

J

K

L

M

N

O

P

Q

R

S

T

A

(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

T

// Basic usage
const result = pipe(
  5,
  n => n * 2,
  n => n + 1
); // 11

// With library functions
const greeting = pipe(
  Option.of("Alice"),
  Option.map(name => name.toUpperCase()),
  Option.map(name => `Hello, ${name}!`),
  Option.getOrElse("Hello!")
); // "Hello, ALICE!"

// Error handling with Result
const result = pipe(
  Result.tryCatch(() => JSON.parse(input), e => "Invalid JSON"),
  Result.map(data => data.value),
  Result.getOrElse(null)
);

flow for creating reusable pipelines without an initial value