Skip to content

Commit

Permalink
fix cartesian type in docs
Browse files Browse the repository at this point in the history
  • Loading branch information
mo-ba committed Apr 28, 2024
1 parent c5b5682 commit ba25920
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions docs/src/pages/en/array/operator/cartesian.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,11 @@ An array of arrays representing the Cartesian product of the input arrays.
## Type

```ts
type cartesian = (dimensions: [number,]) => <A>(a: A[]) => [A][];
type cartesian = (dimensions: [number, number,]) => <A>(a: A[]) => [A][][];
type cartesian = () => [];
type cartesian<A> = (a: A[]) => [A][];
type cartesian<A, B> = (a: A[], b: B[]) => [A, B][][];
//...
type cartesian = (dimensions: [number, number, number, number, number, number, number, number]) => <A>(a: A[]) => [A][][][][][][][][];
type cartesian<A, B, C, D, E, F, G, H> = (a: A[], b: B[], c: C[], d: D[], e: E[], f: F[], g: G[], h: H[]) => [A, B, C, D, E, F, G, H][][][][][][][];
```


Expand Down

0 comments on commit ba25920

Please sign in to comment.