From 207ac4330b0338e0a54fb3444bd0936daa9ebe63 Mon Sep 17 00:00:00 2001 From: Glen Whitney Date: Sun, 7 Aug 2022 16:38:15 +0000 Subject: [PATCH] doc(README): Add a note about adopting 3rd party types --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index ea194c1..75a378e 100644 --- a/README.md +++ b/README.md @@ -26,4 +26,6 @@ Note that Pocomath allows one implementation to depend just on a specific signat Pocomath also lazily reloads operations that depend on the config when that changes, and if an operation has a signature mentioning an undefined type, that signature is ignored until the type is installed, at which point the function lazily redefines itself to use the additional signature. -Pocomath now also allows template operations and template types, also built on top of typed-function (but candidates for integration therein). This is used to make many operations more specific, implement a type-homogeneous Tuple type, and make Complex numbers be type-homogeneous (which it seems like it always should be). One of the cutest consequences of this approach is that with careful definitions of the `Complex` templates, one gets a working quaternion data type absolutely for free as `Complex>` (and integral quaternions as `Complex>`, etc.) \ No newline at end of file +Pocomath now also allows template operations and template types, also built on top of typed-function (but candidates for integration therein). This is used to make many operations more specific, implement a type-homogeneous Tuple type, and make Complex numbers be type-homogeneous (which it seems like it always should be). One of the cutest consequences of this approach is that with careful definitions of the `Complex` templates, one gets a working quaternion data type absolutely for free as `Complex>` (and integral quaternions as `Complex>`, etc.) + +It also now has a facility to adapt a third-party numeric class as a type in Pocomath, see `src/generic/all.mjs` and `src/generic/Types/adapted.mjs`, which it uses by way of example to incorporate fraction.js Fraction objects into Pocomath. \ No newline at end of file