diff options
| author | Laurenz <laurmaedje@gmail.com> | 2023-03-27 22:54:21 +0200 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2023-03-27 22:54:21 +0200 |
| commit | 862d3b7684f170a85082b511bcc30f9d600b4f50 (patch) | |
| tree | 81b92c4d8d1c6d86ba328ea25d991494190e5aee /docs/src/reference | |
| parent | 9dd8ad7b19423d863cc050c7d07ae745251834b9 (diff) | |
Methods can be impure
Fixes #385.
Diffstat (limited to 'docs/src/reference')
| -rw-r--r-- | docs/src/reference/types.md | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/docs/src/reference/types.md b/docs/src/reference/types.md index b87b0779..c323ab41 100644 --- a/docs/src/reference/types.md +++ b/docs/src/reference/types.md @@ -822,6 +822,10 @@ In Typst, all functions are _pure._ This means that for the same arguments, they always return the same result. They cannot "remember" things to produce another value when they are called a second time. +The only exception are built-in methods like +[`array.push(value)`]($type/array.push). These can modify the values they are +called on. + ## Methods ### with() Returns a new function that has the given arguments pre-applied. |
