From 3bc55fc3e0249bb1dd40af81d929320088911569 Mon Sep 17 00:00:00 2001 From: Glen Whitney Date: Mon, 21 Oct 2024 22:02:35 +0000 Subject: [PATCH] refactor: Rename `ship()` to `done()` (#9) Resolves #7. Reviewed-on: https://code.studioinfinity.org/glen/math5/pulls/9 Co-authored-by: Glen Whitney Co-committed-by: Glen Whitney --- src/Complex/arithmetic.ts | 4 ++-- src/Complex/type.ts | 4 ++-- src/core/Dispatcher.ts | 4 ++-- src/numbers/arithmetic.ts | 2 +- src/numbers/type.ts | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/Complex/arithmetic.ts b/src/Complex/arithmetic.ts index f041d82..ac5a5b9 100644 --- a/src/Complex/arithmetic.ts +++ b/src/Complex/arithmetic.ts @@ -125,7 +125,7 @@ export function common() { return dep.divideReal(num, denom) } }) - .ship() + .done() } // Additional implementations for non-uniform signatures @@ -148,5 +148,5 @@ export function mixed() { divide: dep => (z, r) => dep.complex(dep.divTR(z.re, r), dep.divTR(z.im, r)) }) - .ship() + .done() } diff --git a/src/Complex/type.ts b/src/Complex/type.ts index ff42a3b..a97a894 100644 --- a/src/Complex/type.ts +++ b/src/Complex/type.ts @@ -48,7 +48,7 @@ export function lift() { return implementations>() .dependent({zero: {}}, { complex: dep => (a, b) => cplex(a, b || dep.zero(a)) - }).ship() + }).done() } export function common() { @@ -68,5 +68,5 @@ export function common() { .dependent(baseSignature({re: {}}), { re: dep => z => dep.re(z.re) }) - .ship() + .done() } diff --git a/src/core/Dispatcher.ts b/src/core/Dispatcher.ts index 198b69a..5ae8e06 100644 --- a/src/core/Dispatcher.ts +++ b/src/core/Dispatcher.ts @@ -139,7 +139,7 @@ interface ImplementationBuilder< Specs & {[K in NewKeys]: DepCheck} > - ship(info?: ReflectedTypeInfo): Implementations & ReflectedTypeInfo + done(info?: ReflectedTypeInfo): Implementations & ReflectedTypeInfo } // And a function that actually provides the builder interface: @@ -191,7 +191,7 @@ function impBuilder< Specs & {[K in NewKeys]: DepCheck} > }, - ship(info?: ReflectedTypeInfo) { + done(info?: ReflectedTypeInfo) { return { ...sofar, ...info } } } diff --git a/src/numbers/arithmetic.ts b/src/numbers/arithmetic.ts index 799d8b8..b4f45b3 100644 --- a/src/numbers/arithmetic.ts +++ b/src/numbers/arithmetic.ts @@ -23,4 +23,4 @@ export const common = implementations>() return dep.complex(0, Math.sqrt(-a)) } }}) - .ship() + .done() diff --git a/src/numbers/type.ts b/src/numbers/type.ts index 7807d54..2d53929 100644 --- a/src/numbers/type.ts +++ b/src/numbers/type.ts @@ -28,4 +28,4 @@ export const common = implementations>() one: a => 1, nan: a => NaN, re: a => a - }).ship() + }).done()