⁉️Type generics

In Snowball, type generics enable you to write reusable code that can operate on different types. They allow you to create functions, data structures, and components that can adapt to various data types without sacrificing type safety. Type generics in Snowball are denoted by <...> and provide flexibility and versatility in your code. Here's how type generics are used in Snowball:

let a: Vector<i32>;
  • In this example we are pointing to a vector type that has the first generic argument as i32.

Last updated

Was this helpful?