From 5058bc5201538ac5be07dcbf0c40eeebbf28ff10 Mon Sep 17 00:00:00 2001 From: Joe Mooring Date: Sun, 31 Dec 2023 12:35:39 -0800 Subject: [PATCH] collections.Seq: Specify max slice size --- content/en/functions/collections/Seq.md | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/content/en/functions/collections/Seq.md b/content/en/functions/collections/Seq.md index 48303c1d3..b572bd7c0 100644 --- a/content/en/functions/collections/Seq.md +++ b/content/en/functions/collections/Seq.md @@ -21,7 +21,7 @@ aliases: [/functions/seq] {{ seq -2 2 2 }} → [-2 0 2] ``` -Iterate over a sequence of integers: +A contrived example of iterating over a sequence of integers: ```go-html-template {{ $product := 1 }} @@ -31,10 +31,6 @@ Iterate over a sequence of integers: {{ $product }} → 24 ``` -The example above is contrived. To calculate the product of 2 or more numbers, use the [`math.Product`] function: - -```go-html-template -{{ math.Product (seq 4) }} → 24 -``` - -[`math.Product`]: /functions/math/product +{{% note %}} +The slice created by the `seq` function is limited to 2000 elements. +{{% /note %}}