From f64a224692ed68458542fce875f5377a09ab910e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Pedersen?= Date: Mon, 6 Aug 2018 09:58:36 +0200 Subject: [PATCH] Update cond.md --- content/en/functions/cond.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/content/en/functions/cond.md b/content/en/functions/cond.md index 72a9c0a9a..a5e534426 100644 --- a/content/en/functions/cond.md +++ b/content/en/functions/cond.md @@ -7,7 +7,6 @@ menu: docs: parent: "functions" signature: ["cond CONTROL VAR1 VAR2"] -aliases: [/functions/cond/] hugoversion: 0.27 relatedfuncs: [default] toc: false @@ -29,4 +28,4 @@ Would emit "goose" if the `$geese` array has exactly 1 item, or "geese" otherwis 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 +{{% /warning %}}