Takes functions and builds a function which consecutively calls each given function with a result from a previous one. Similar to Opt.pipe, but doesn't take input directly, instead returns a function which can be called repeatedly with different inputs.
flow( // 1. 63
add1, // 2. 64
Math.sqrt, // 3. 8
)(63), // 4. 8
// gives same result as
Math.sqrt(add1(63)) // 8
const f = flow(add1, Math.sqrt); // (_: number) => number
f(63); // 8
f(3); // 2
Takes functions and builds a function which consecutively calls each given function with a result from a previous one. Similar to Opt.pipe, but doesn't take input directly, instead returns a function which can be called repeatedly with different inputs.
flow( // 1. 63
add1, // 2. 64
Math.sqrt, // 3. 8
)(63), // 4. 8
// gives same result as
Math.sqrt(add1(63)) // 8
const f = flow(add1, Math.sqrt); // (_: number) => number
f(63); // 8
f(3); // 2
Takes functions and builds a function which consecutively calls each given function with a result from a previous one. Similar to Opt.pipe, but doesn't take input directly, instead returns a function which can be called repeatedly with different inputs.
flow( // 1. 63
add1, // 2. 64
Math.sqrt, // 3. 8
)(63), // 4. 8
// gives same result as
Math.sqrt(add1(63)) // 8
const f = flow(add1, Math.sqrt); // (_: number) => number
f(63); // 8
f(3); // 2
Takes functions and builds a function which consecutively calls each given function with a result from a previous one. Similar to Opt.pipe, but doesn't take input directly, instead returns a function which can be called repeatedly with different inputs.
flow( // 1. 63
add1, // 2. 64
Math.sqrt, // 3. 8
)(63), // 4. 8
// gives same result as
Math.sqrt(add1(63)) // 8
const f = flow(add1, Math.sqrt); // (_: number) => number
f(63); // 8
f(3); // 2
Takes functions and builds a function which consecutively calls each given function with a result from a previous one. Similar to Opt.pipe, but doesn't take input directly, instead returns a function which can be called repeatedly with different inputs.
flow( // 1. 63
add1, // 2. 64
Math.sqrt, // 3. 8
)(63), // 4. 8
// gives same result as
Math.sqrt(add1(63)) // 8
const f = flow(add1, Math.sqrt); // (_: number) => number
f(63); // 8
f(3); // 2
Takes functions and builds a function which consecutively calls each given function with a result from a previous one. Similar to Opt.pipe, but doesn't take input directly, instead returns a function which can be called repeatedly with different inputs.
flow( // 1. 63
add1, // 2. 64
Math.sqrt, // 3. 8
)(63), // 4. 8
// gives same result as
Math.sqrt(add1(63)) // 8
const f = flow(add1, Math.sqrt); // (_: number) => number
f(63); // 8
f(3); // 2
Takes functions and builds a function which consecutively calls each given function with a result from a previous one. Similar to Opt.pipe, but doesn't take input directly, instead returns a function which can be called repeatedly with different inputs.
flow( // 1. 63
add1, // 2. 64
Math.sqrt, // 3. 8
)(63), // 4. 8
// gives same result as
Math.sqrt(add1(63)) // 8
const f = flow(add1, Math.sqrt); // (_: number) => number
f(63); // 8
f(3); // 2
Takes functions and builds a function which consecutively calls each given function with a result from a previous one. Similar to Opt.pipe, but doesn't take input directly, instead returns a function which can be called repeatedly with different inputs.
flow( // 1. 63
add1, // 2. 64
Math.sqrt, // 3. 8
)(63), // 4. 8
// gives same result as
Math.sqrt(add1(63)) // 8
const f = flow(add1, Math.sqrt); // (_: number) => number
f(63); // 8
f(3); // 2
Takes functions and builds a function which consecutively calls each given function with a result from a previous one. Similar to Opt.pipe, but doesn't take input directly, instead returns a function which can be called repeatedly with different inputs.
flow( // 1. 63
add1, // 2. 64
Math.sqrt, // 3. 8
)(63), // 4. 8
// gives same result as
Math.sqrt(add1(63)) // 8
const f = flow(add1, Math.sqrt); // (_: number) => number
f(63); // 8
f(3); // 2
Takes functions and builds a function which consecutively calls each given function with a result from a previous one. Similar to Opt.pipe, but doesn't take input directly, instead returns a function which can be called repeatedly with different inputs.