You might be able to do this with concepts. They let you add arbitrary constraints to a generic type. I’m not sure if it’d work while still resolving to the base Node type for storage.
<https://nim-lang.org/docs/manual_experimental.html#concepts>
You might be able to do this with concepts. They let you add arbitrary constraints to a generic type. I’m not sure if it’d work while still resolving to the base Node type for storage.
<https://nim-lang.org/docs/manual_experimental.html#concepts>