From 32a3de441af5c1511f6e5cf3c9e6cd56b671c4ec Mon Sep 17 00:00:00 2001 From: Vladimir Ivakin Date: Wed, 21 Feb 2024 02:57:46 +0100 Subject: [PATCH] Update cluster example (#361) Use bigger array to have cluster size (3) different from number of clusters (4) --- docs/array/cluster.mdx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/array/cluster.mdx b/docs/array/cluster.mdx index 92ebc8b9..19f64237 100644 --- a/docs/array/cluster.mdx +++ b/docs/array/cluster.mdx @@ -13,12 +13,13 @@ split as evenly as possible. ```ts import { cluster } from 'radash' -const gods = ['Ra', 'Zeus', 'Loki', 'Vishnu', 'Icarus', 'Osiris', 'Thor'] +const gods = ['Ra', 'Zeus', 'Loki', 'Vishnu', 'Icarus', 'Osiris', 'Thor', 'Apollo', 'Artemis', 'Athena'] cluster(gods, 3) // => [ // [ 'Ra', 'Zeus', 'Loki' ], // [ 'Vishnu', 'Icarus', 'Osiris' ], -// [ 'Thor' ] +// ['Thor', 'Apollo', 'Artemis'], +// ['Athena'] // ] ```