feat: Add generic types and Complex numbers #21
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "generic_complex"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The basic idea is that generic types can be called with argument(s) to produce a new type object, and if all types supplied as arguments are concrete, then the result will be a concrete type. The test of a generic type must determine if the entity is an instance of any specialization of the type; and it must also have a
refine
method that takes such an instance and returns its fully-specialized concrete type. It must also have a methodspecializesTo
that takes a concrete type and returns whether that concrete type is a specialization of this generic type.Remaining to do: implement all of the number/complex functions from pocomath that don't depend on config.predictable and test them.
WIP: feat: Add generic types and Complex numbersto feat: Add generic types and Complex numbersActually, since this has reached a working point which essentially fulfills the original goals of the PR, I'm going to merge this so that #12 can be addressed before there's even more code to refactor. Then we can come back and implement the other complex functions in a subsequent PR.