Regarding generic data structures, the author should consult the sort package, which has typed generics; much the same approach can be used for generic data structures.
More complex type inference requires a more complex (and hence buggier) compiler.
Finally, the author should investigate the unsafe package; I believe the following code will do what he wants:
More complex type inference requires a more complex (and hence buggier) compiler.
Finally, the author should investigate the unsafe package; I believe the following code will do what he wants:
Verbose? Sure.