Update Item Specifications

Glen Whitney 2025-04-02 05:18:39 +00:00
parent 6c1b3f062c
commit ec8cd0aba6

@ -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:
```
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 complex = math.complex.resolve(add.returns, add.returns)
return Returns(