feat: Template operations #41

Merged
glen merged 10 commits from template_operations into main 2022-08-01 10:09:32 +00:00
Owner

Relational functions are added using templates, and existing generic functions are made more strict with them. Also a new built-in typeOf function is added, that automatically updates itself.

Resolves #34.

Relational functions are added using templates, and existing generic functions are made more strict with them. Also a new built-in typeOf function is added, that automatically updates itself. Resolves #34.
glen added 10 commits 2022-08-01 10:09:10 +00:00
The stubs are so far all no-ops so basically at the moment the only
  allowed template parameter 'T' is just a synonym for 'any'. But at least
  this allows us to put the definition of the generic `subtract` into
  the exact form we actually want to support.
These are exactly the types that might match before the given type, and
  hence which require to have their template instantiations defined when
  an instantiation with the given type is made.
This commit also adds a built-in `typeOf` function to every PocomathInstance.
  It also adds a notation (prefix '!') for "eager" templeates that
  instantiate themselves for all types immediately upon definition.
glen merged commit fe54bc6004 into main 2022-08-01 10:09:32 +00:00
Sign in to join this conversation.
No description provided.