Skip to main content
Version: 1.0

Variadic

struct Variadic

A namespace for variadic utilities.

Implemented traits

AnyType, ImplicitlyDestructible

comptime members

concat_types

comptime concat_types[T: AnyTrait[AnyType], //, *Ts: KGENParamList[T]] = #kgen.param_list.concat(values)

Represents the concatenation of multiple variadic sequences of types.

Parameters

  • T (AnyTrait): The trait that types in the variadic sequences must conform to.
  • *Ts (KGENParamList): The variadic sequences to concatenate.

TypesOfTrait

comptime TypesOfTrait[T: AnyTrait[AnyType]] = KGENParamList[T]

Represents a raw variadic sequence of types that satisfy the specified trait.

Parameters

  • T (AnyTrait): The trait that types in the variadic sequence must conform to.

zip_types

comptime zip_types[Trait: AnyTrait[AnyType], //, *types: KGENParamList[Trait]] = ParameterList[#kgen.param_list.zip(values)]

Zips a group of variadics of types together.

Parameters

  • Trait (AnyTrait): The trait that the types conform to.
  • *types (KGENParamList): The type to check for.

zip_values

comptime zip_values[type: AnyType, //, *values: KGENParamList[type]] = ParameterList[#kgen.param_list.zip(values)]

Zips a group of variadics of values together.

Parameters

  • type (AnyType): The type that the values conform to.
  • *values (KGENParamList): The values to zip.