Documentation ¶
Overview ¶
An example package using Go-as-if-it-had-parametric-polymorphism, with an "iter" package in the standard library, following an already idiomatic Go iteration pattern.
The feature is entirely imaginary, but I've tried to write the code to fit as much within Go's existing idioms as possible.
Generics questions that this code does not attempt to resolve:
- What semantics are there for equality of values with parametric types?
- what happens if you convert a value with parametric type to an interface?
Points given for pointing out syntax errors, logical inconsistencies or language-feature implementation roadtraps.
Click to show internal directories.
Click to hide internal directories.