gxyz/gxyz_tuple
Functions
pub fn apply_from2(tuple: #(a, b), fun: fn(a, b) -> c) -> c
use the values of a tuple of length 2 as the arguments to the supplied function
pub fn apply_from3(tuple: #(a, b, c), fun: fn(a, b, c) -> d) -> d
use the values of a tuple of length 3 as the arguments to the supplied function
pub fn apply_from4(
tuple: #(a, b, c, d),
fun: fn(a, b, c, d) -> e,
) -> e
use the values of a tuple of length 4 as the arguments to the supplied function
pub fn apply_from5(
tuple: #(a, b, c, d, e),
fun: fn(a, b, c, d, e) -> f,
) -> f
use the values of a tuple of length 5 as the arguments to the supplied function
pub fn at_dynamic(
tuple: a,
index: Int,
fun: fn(Dynamic) -> Result(b, List(DecodeError)),
) -> Result(b, List(DecodeError))
returns the value at index from the a tuple, using a dynamic.Decode function
pub fn map2_0(tuple: #(a, b), fun: fn(a) -> c) -> #(c, b)
applies the function to the 1st element of a tuple of length 2
pub fn map2_1(tuple: #(a, b), fun: fn(b) -> c) -> #(a, c)
applies the function to the 2nd element of a tuple of length 2
pub fn map3_0(tuple: #(a, b, c), fun: fn(a) -> d) -> #(d, b, c)
applies the function to the 1st element of a tuple of length 3
pub fn map3_1(tuple: #(a, b, c), fun: fn(b) -> d) -> #(a, d, c)
applies the function to the 2nd element of a tuple of length 3
pub fn map3_2(tuple: #(a, b, c), fun: fn(c) -> d) -> #(a, b, d)
applies the function to the 3rd element of a tuple of length 3
pub fn map4_0(
tuple: #(a, b, c, d),
fun: fn(a) -> e,
) -> #(e, b, c, d)
applies the function to the 1st element of a tuple of length 4
pub fn map4_1(
tuple: #(a, b, c, d),
fun: fn(b) -> e,
) -> #(a, e, c, d)
applies the function to the 2nd element of a tuple of length 4
pub fn map4_2(
tuple: #(a, b, c, d),
fun: fn(c) -> e,
) -> #(a, b, e, d)
applies the function to the 3rd element of a tuple of length 4
pub fn map4_3(
tuple: #(a, b, c, d),
fun: fn(d) -> e,
) -> #(a, b, c, e)
applies the function to the 4th element of a tuple of length 4
pub fn map5_0(
tuple: #(a, b, c, d, e),
fun: fn(a) -> f,
) -> #(f, b, c, d, e)
applies the function to the 1st element of a tuple of length 5
pub fn map5_1(
tuple: #(a, b, c, d, e),
fun: fn(b) -> f,
) -> #(a, f, c, d, e)
applies the function to the 2nd element of a tuple of length 5
pub fn map5_2(
tuple: #(a, b, c, d, e),
fun: fn(c) -> f,
) -> #(a, b, f, d, e)
applies the function to the 3rd element of a tuple of length 5
pub fn map5_3(
tuple: #(a, b, c, d, e),
fun: fn(d) -> f,
) -> #(a, b, c, f, e)
applies the function to the 4th element of a tuple of length 5