Update Item Specifications
parent
6c1b3f062c
commit
ec8cd0aba6
1 changed files with 1 additions and 1 deletions
|
@ -41,7 +41,7 @@ Here, onType creates one or more "patterns" (an array of types to match against
|
||||||
|
|
||||||
Next, let's look at a method like addition of two complex numbers that accepts many types (any instantiation of Complex) but not all types, and has dependencies:
|
Next, let's look at a method like addition of two complex numbers that accepts many types (any instantiation of Complex) but not all types, and has dependencies:
|
||||||
```
|
```
|
||||||
export const add = onType([Complex, Complex]], (math, [T, U]) => {
|
export const add = onType([Complex, Complex], (math, [T, U]) => {
|
||||||
const add = math.add.resolve(T.Base, U.Base)
|
const add = math.add.resolve(T.Base, U.Base)
|
||||||
const complex = math.complex.resolve(add.returns, add.returns)
|
const complex = math.complex.resolve(add.returns, add.returns)
|
||||||
return Returns(
|
return Returns(
|
||||||
|
|
Loading…
Add table
Reference in a new issue