# 编程函数

定义函数，暂缓与释放求值，按条件分支，并就地更新变量。

43 个函数

## 有说明的函数

- [add_to](https://zh.hilberon.com/library/add_to)

  就地给变量加上一个值，并返回新值。
- [construct](https://zh.hilberon.com/library/construct)

  把本身是计算得到的头部作用于参数，例如 f'(0) 或 (x => body)(a)。
- [decrement](https://zh.hilberon.com/library/decrement)

  将变量就地减 1，并返回它原来的值。
- [divide_by](https://zh.hilberon.com/library/divide_by)

  将变量就地除以一个值，并返回新的值。
- [evaluate](https://zh.hilberon.com/library/evaluate)

  对表达式求值，即使它本应保持不计算。
- [function](https://zh.hilberon.com/library/function)

  没有名字的函数；也可写作 x => body。
- [ifelse](https://zh.hilberon.com/library/ifelse)

  由测试条件选出的值。
- [increment](https://zh.hilberon.com/library/increment)

  将变量原地加 1，并返回它的旧值。
- [indicator](https://zh.hilberon.com/library/indicator)

  把条件表示为数：为真时为 1，为假时为 0。
- [piecewise](https://zh.hilberon.com/library/piecewise)

  按条件写出的分段取值，写作 value if condition，并可带一个 otherwise 分支。
- [pre_decrement](https://zh.hilberon.com/library/pre_decrement)

  将变量就地减 1，并返回新值。
- [pre_increment](https://zh.hilberon.com/library/pre_increment)

  把变量原地加 1 并返回新值。
- [release_hold](https://zh.hilberon.com/library/release_hold)

  对已保持的表达式求值。
- [set](https://zh.hilberon.com/library/set)

  给名称赋值；也可写作 name := value。
- [set_delayed](https://zh.hilberon.com/library/set_delayed)

  定义函数；也可写作 f(x) := body。
- [slot](https://zh.hilberon.com/library/slot)

  无名函数的第 n 个参数：在 function(body) 中，slot(1) 是第一个。
- [subs_repeated](https://zh.hilberon.com/library/subs_repeated)

  反复应用代入规则，直到不再变化。
- [subtract_from](https://zh.hilberon.com/library/subtract_from)

  就地从一个变量中减去一个值，并返回新值。
- [times_by](https://zh.hilberon.com/library/times_by)

  就地把变量乘以一个值，并返回新值。
- [with_effort](https://zh.hilberon.com/library/with_effort)

  以快速、标准、深入或穷尽的计算强度对一个主体求值。

## 此类别中的其他函数

这些函数还没有说明，每个只列出它的第一种写法。

- [alternatives](https://zh.hilberon.com/library/alternatives)
- [block](https://zh.hilberon.com/library/block)
- [clear](https://zh.hilberon.com/library/clear)
- [clear_all](https://zh.hilberon.com/library/clear_all)
- [composition](https://zh.hilberon.com/library/composition)
- [conditional](https://zh.hilberon.com/library/conditional)
- [defer](https://zh.hilberon.com/library/defer)
- [for_loop](https://zh.hilberon.com/library/for_loop)
- [hold](https://zh.hilberon.com/library/hold)
- [is_match](https://zh.hilberon.com/library/is_match)
- [iterate](https://zh.hilberon.com/library/iterate)
- [module](https://zh.hilberon.com/library/module)
- [repeat](https://zh.hilberon.com/library/repeat)
- [replace](https://zh.hilberon.com/library/replace)
- [replace_list](https://zh.hilberon.com/library/replace_list)
- [return](https://zh.hilberon.com/library/return)
- [step_constrained](https://zh.hilberon.com/library/step_constrained)
- [switch](https://zh.hilberon.com/library/switch)
- [time_constrained](https://zh.hilberon.com/library/time_constrained)
- [unevaluated](https://zh.hilberon.com/library/unevaluated)
- [which](https://zh.hilberon.com/library/which)
- [while_loop](https://zh.hilberon.com/library/while_loop)
- [with](https://zh.hilberon.com/library/with)

## 其他类别

- [抽象代数](https://zh.hilberon.com/library/category/abstract-algebra) 55
- [代数](https://zh.hilberon.com/library/category/algebra) 52
- [假设](https://zh.hilberon.com/library/category/assumptions) 10
- [微积分](https://zh.hilberon.com/library/category/calculus) 21
- [微分方程与差分方程](https://zh.hilberon.com/library/category/differential-and-difference-equations) 187
- [初等函数](https://zh.hilberon.com/library/category/elementary-functions) 34
- [方程求解](https://zh.hilberon.com/library/category/equation-solving) 15
- [线性代数](https://zh.hilberon.com/library/category/linear-algebra) 44
- [列表](https://zh.hilberon.com/library/category/lists) 52
- [逻辑与比较](https://zh.hilberon.com/library/category/logic-and-comparison) 45
- [数论](https://zh.hilberon.com/library/category/number-theory) 53
- [数值计算](https://zh.hilberon.com/library/category/numerical-computation) 5
- [优化](https://zh.hilberon.com/library/category/optimization) 6
- [展示](https://zh.hilberon.com/library/category/presentation) 7
- [概率与随机过程](https://zh.hilberon.com/library/category/probability-and-stochastic-processes) 73
- [级数与求和](https://zh.hilberon.com/library/category/series-and-sums) 17
- [特殊函数](https://zh.hilberon.com/library/category/special-functions) 95
- [字符串](https://zh.hilberon.com/library/category/strings) 4
- [变换](https://zh.hilberon.com/library/category/transforms) 15
- [三角学](https://zh.hilberon.com/library/category/trigonometry) 28

---
Source: https://zh.hilberon.com/library/category/programming
