summaryrefslogtreecommitdiffstats
path: root/docs/content/en/functions/cond.md
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2018-05-25 15:05:23 +0200
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2018-05-25 15:05:23 +0200
commit7b9dbef41acfc619754d5a2a342a00e37f6f96e0 (patch)
tree6106d8da7f4686a4969c16aca67f74fba844df71 /docs/content/en/functions/cond.md
parent0bf0e1972df01cb3c5cff21b1accbbff55a6a475 (diff)
parentd2b1030060d3c91d5f9ffa3456418da16bd74f1d (diff)
Diffstat (limited to 'docs/content/en/functions/cond.md')
-rw-r--r--docs/content/en/functions/cond.md6
1 files changed, 6 insertions, 0 deletions
diff --git a/docs/content/en/functions/cond.md b/docs/content/en/functions/cond.md
index 16c1f105f..72a9c0a9a 100644
--- a/docs/content/en/functions/cond.md
+++ b/docs/content/en/functions/cond.md
@@ -24,3 +24,9 @@ Example:
```
Would emit "goose" if the `$geese` array has exactly 1 item, or "geese" otherwise.
+
+{{% warning %}}
+Whenever you use a `cond` function, *both* variable expressions are *always* evaluated. This means that a usage like `cond false (div 1 0) 27` will throw an error because `div 1 0` will be evaluated *even though the condition is false*.
+
+In other words, the `cond` function does *not* provide [short-circuit evaluation](https://en.wikipedia.org/wiki/Short-circuit_evaluation) and does *not* work like a normal [ternary operator](https://en.wikipedia.org/wiki/%3F:) that will pass over the first expression if the condition returns `false`.
+{{% /warning %}} \ No newline at end of file