Move sketch functions to KCL; remove Rust decl dead code (#7335)

Signed-off-by: Nick Cameron <nrc@ncameron.org>
This commit is contained in:
Nick Cameron
2025-06-05 07:41:01 +12:00
committed by GitHub
parent 5ceb92d117
commit 5235a731ba
104 changed files with 1647 additions and 143019 deletions

View File

@ -1,11 +1,11 @@
---
title: "reduce"
subtitle: "Function in std::array"
excerpt: ""
excerpt: "Take a starting value. Then, for each element of an array, calculate the next value, using the previous value and the element."
layout: manual
---
Take a starting value. Then, for each element of an array, calculate the next value, using the previous value and the element.
```kcl
reduce(
@ -15,8 +15,7 @@ reduce(
): any
```
Take a starting value. Then, for each element of an array, calculate the next value,
using the previous value and the element.
### Arguments
@ -28,7 +27,7 @@ using the previous value and the element.
### Returns
[`any`](/docs/kcl-std/types/std-types-any)
[`any`](/docs/kcl-std/types/std-types-any) - The [`any`](/docs/kcl-std/types/std-types-any) type is the type of all possible values in KCL. I.e., if a function accepts an argument with type [`any`](/docs/kcl-std/types/std-types-any), then it can accept any value.
### Examples