From c899b0f05af520f8ebb5e1c508aa0726ae020bd2 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=A9mie=20Astor?= Date: Sat, 23 Apr 2022 17:22:06 +0200 Subject: [PATCH] document expression lambda --- docs/Reference/Functions/Lambdas.mdr | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs/Reference/Functions/Lambdas.mdr b/docs/Reference/Functions/Lambdas.mdr index 8e394ced..99142081 100644 --- a/docs/Reference/Functions/Lambdas.mdr +++ b/docs/Reference/Functions/Lambdas.mdr @@ -13,7 +13,13 @@ You can even use it to ```gwion,editable \ i { <<< "passed '", i, "'" >>>; }(3); ``` +### Short lambdas +if the lambda consists of only one expression, the result of that expression is implicetely returned. +Notice there is no semicolon in the lambda body; +```gwion,editable +<<< \ { 42 }() >>>; +``` ## Use case -- 2.43.0