For the complete documentation index, see llms.txt. Markdown versions of all pages are available by appending .md to any URL (e.g. /get-started.md).
Mojo function
apply_zip
def apply_zip[func: def(IntTuple, IntTuple) thin -> IntTuple](t1: IntTuple, t2: IntTuple) -> IntTuple
Apply a function to pairs of elements from two IntTuples.
This function zips two IntTuples together and applies the given function
to each pair of elements, creating a new IntTuple with the results.
Parameters:
- func (
def(IntTuple, IntTuple) thin -> IntTuple): Function that takes twoIntTuples and returns anIntTuple.
Args:
Returns:
IntTuple: A new IntTuple containing the results of applying func to each pair.
def apply_zip[FuncType: def(IntTuple, IntTuple) -> IntTuple](t1: IntTuple, t2: IntTuple, func: FuncType) -> IntTuple
Apply a function to pairs of elements from two IntTuples.
This overload takes the function as a runtime value so unified closures can capture from their environment.
Parameters:
- FuncType (
def(IntTuple, IntTuple) -> IntTuple): The zip function type.
Args:
- t1 (
IntTuple): FirstIntTuple. - t2 (
IntTuple): SecondIntTuple. - func (
FuncType): Function that takes twoIntTuples and returns anIntTuple.
Returns:
IntTuple: A new IntTuple containing the results of applying func to each pair.
def apply_zip[func: def(IntTuple, IntTuple, IntTuple) thin -> IntTuple](t1: IntTuple, t2: IntTuple, t3: IntTuple) -> IntTuple
Apply a function to triplets of elements from three IntTuples.
This function zips three IntTuples together and applies the given function
to each triplet of elements, creating a new IntTuple with the results.
Parameters:
- func (
def(IntTuple, IntTuple, IntTuple) thin -> IntTuple): Function that takes threeIntTuples and returns anIntTuple.
Args:
Returns:
IntTuple: A new IntTuple containing the results of applying func to each triplet.
def apply_zip[FuncType: def(IntTuple, IntTuple, IntTuple) -> IntTuple](t1: IntTuple, t2: IntTuple, t3: IntTuple, func: FuncType) -> IntTuple
Apply a function to triplets of elements from three IntTuples.
This overload takes the function as a runtime value so unified closures can capture from their environment.
Parameters:
- FuncType (
def(IntTuple, IntTuple, IntTuple) -> IntTuple): The zip function type.
Args:
- t1 (
IntTuple): FirstIntTuple. - t2 (
IntTuple): SecondIntTuple. - t3 (
IntTuple): ThirdIntTuple. - func (
FuncType): Function that takes threeIntTuples and returns anIntTuple.
Returns:
IntTuple: A new IntTuple containing the results of applying func to each triplet.