Open kevinbarabash opened 10 months ago
let push = fn <T, N: unique type>(vector: Vec<T, N>, item: T) -> Vet<T, N + 1> let pop = fn <T, N: unique type>(vector: Vec<T, N + 1>, item: T) -> Vet<T, N>
Avoid subtraction whenever possible.
Here's a tutorial that looks like it may be useful: https://math.andrej.com/2012/11/08/how-to-implement-dependent-type-theory-i/
Avoid subtraction whenever possible.