refactor: Rename ship()
to done()
This commit is contained in:
parent
75a950e830
commit
33a0938818
@ -125,7 +125,7 @@ export function common<T>() {
|
|||||||
return dep.divideReal(num, denom)
|
return dep.divideReal(num, denom)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.ship()
|
.done()
|
||||||
}
|
}
|
||||||
|
|
||||||
// Additional implementations for non-uniform signatures
|
// Additional implementations for non-uniform signatures
|
||||||
@ -148,5 +148,5 @@ export function mixed<T>() {
|
|||||||
divide: dep => (z, r) =>
|
divide: dep => (z, r) =>
|
||||||
dep.complex(dep.divTR(z.re, r), dep.divTR(z.im, r))
|
dep.complex(dep.divTR(z.re, r), dep.divTR(z.im, r))
|
||||||
})
|
})
|
||||||
.ship()
|
.done()
|
||||||
}
|
}
|
||||||
|
@ -48,7 +48,7 @@ export function lift<T>() {
|
|||||||
return implementations<CommonSignature<T>>()
|
return implementations<CommonSignature<T>>()
|
||||||
.dependent({zero: {}}, {
|
.dependent({zero: {}}, {
|
||||||
complex: dep => (a, b) => cplex(a, b || dep.zero(a))
|
complex: dep => (a, b) => cplex(a, b || dep.zero(a))
|
||||||
}).ship()
|
}).done()
|
||||||
}
|
}
|
||||||
|
|
||||||
export function common<T>() {
|
export function common<T>() {
|
||||||
@ -68,5 +68,5 @@ export function common<T>() {
|
|||||||
.dependent(baseSignature({re: {}}), {
|
.dependent(baseSignature({re: {}}), {
|
||||||
re: dep => z => dep.re(z.re)
|
re: dep => z => dep.re(z.re)
|
||||||
})
|
})
|
||||||
.ship()
|
.done()
|
||||||
}
|
}
|
||||||
|
@ -139,7 +139,7 @@ interface ImplementationBuilder<
|
|||||||
Specs & {[K in NewKeys]: DepCheck<RD, Signatures>}
|
Specs & {[K in NewKeys]: DepCheck<RD, Signatures>}
|
||||||
>
|
>
|
||||||
|
|
||||||
ship(info?: ReflectedTypeInfo): Implementations<Signatures, NeedKeys, NeedList, Specs> & ReflectedTypeInfo
|
done(info?: ReflectedTypeInfo): Implementations<Signatures, NeedKeys, NeedList, Specs> & ReflectedTypeInfo
|
||||||
}
|
}
|
||||||
|
|
||||||
// And a function that actually provides the builder interface:
|
// And a function that actually provides the builder interface:
|
||||||
@ -191,7 +191,7 @@ function impBuilder<
|
|||||||
Specs & {[K in NewKeys]: DepCheck<RD, Signatures, DepKeys>}
|
Specs & {[K in NewKeys]: DepCheck<RD, Signatures, DepKeys>}
|
||||||
>
|
>
|
||||||
},
|
},
|
||||||
ship(info?: ReflectedTypeInfo) {
|
done(info?: ReflectedTypeInfo) {
|
||||||
return { ...sofar, ...info }
|
return { ...sofar, ...info }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -23,4 +23,4 @@ export const common = implementations<CommonSignature<number>>()
|
|||||||
return dep.complex(0, Math.sqrt(-a))
|
return dep.complex(0, Math.sqrt(-a))
|
||||||
}
|
}
|
||||||
}})
|
}})
|
||||||
.ship()
|
.done()
|
||||||
|
@ -28,4 +28,4 @@ export const common = implementations<CommonSignature<number>>()
|
|||||||
one: a => 1,
|
one: a => 1,
|
||||||
nan: a => NaN,
|
nan: a => NaN,
|
||||||
re: a => a
|
re: a => a
|
||||||
}).ship()
|
}).done()
|
||||||
|
Loading…
Reference in New Issue
Block a user