diff --git a/src/Lazy/flat.ts b/src/Lazy/flat.ts index 4e37ab58..384d2ce4 100644 --- a/src/Lazy/flat.ts +++ b/src/Lazy/flat.ts @@ -203,7 +203,7 @@ function async( /** * Returns flattened Iterable/AsyncIterable. - * If first argument is number, more perform flatten `flat(2, [[[1,2]]]) // [1,2]` + * If first argument is number, more perform flatten `flat([[[1,2]]], 2) // [1,2]` * * @example * ```ts diff --git a/src/Lazy/fx.ts b/src/Lazy/fx.ts index d2d8cae7..63b2891f 100644 --- a/src/Lazy/fx.ts +++ b/src/Lazy/fx.ts @@ -60,7 +60,14 @@ class FxAsyncIterable { /** * Returns flattened AsyncIterable. - * If first argument is number, more perform flatten `flat(2, [[[1,2]]]) // [1,2]` + * If first argument is number, more perform flatten + * + * @example + * ``` + * await fx([[1],[[2]]]) + * .toAsync() + * .flat(2).toArray(); // [1,2] + * ``` * * see {@link https://fxts.dev/docs/flat | flat} */ @@ -312,7 +319,10 @@ export class FxIterable { /** * Returns flattened Iterable. - * If first argument is number, more perform flatten `flat(2, [[[1,2]]]) // [1,2]` + * If first argument is number, more perform flatten + * + * @example + * `fx([[1],[[2]]]).flat(2).toArray(); // [1,2]` * * see {@link https://fxts.dev/docs/flat | flat} */