gextra/function
Functions
pub fn hole7(
func: fn(a, b, c, d, e, f, g, h) -> i,
a: a,
) -> fn(b, c, d, e, f, g, h) -> i
pub fn hole8(
func: fn(a, b, c, d, e, f, g, h, i) -> j,
a: a,
) -> fn(b, c, d, e, f, g, h, i) -> j
pub fn pipe1(func: fn(a, b) -> c, a: a) -> fn(b) -> c
Allows piping into a two argument function in a use statement.
Example
fn main() {
use n <- 32
|> int.div(2)
|> pipe(result.map)
let assert 16 = n
}
pub fn pipe2(func: fn(a, b, c) -> d, a: a, b: b) -> fn(c) -> d
Allows piping into a three argument function in a use statement.
pub fn pipe3(
func: fn(a, b, c, d) -> e,
a: a,
b: b,
c: c,
) -> fn(d) -> e
Allows piping into a four argument function in a use statement.
pub fn pipe4(
func: fn(a, b, c, d, e) -> f,
a: a,
b: b,
c: c,
d: d,
) -> fn(e) -> f
Allows piping into a five argument function in a use statement.
pub fn pipe5(
func: fn(a, b, c, d, e, f) -> g,
a: a,
b: b,
c: c,
d: d,
e: e,
) -> fn(f) -> g
Allows piping into a six argument function in a use statement.
pub fn pipe6(
func: fn(a, b, c, d, e, f, g) -> h,
a: a,
b: b,
c: c,
d: d,
e: e,
f: f,
) -> fn(g) -> h
Allows piping into a seven argument function in a use statement.
pub fn pipe7(
func: fn(a, b, c, d, e, f, g, h) -> i,
a: a,
b: b,
c: c,
d: d,
e: e,
f: f,
g: g,
) -> fn(h) -> i
Allows piping into an eight argument function in a use statement.