From f52a182afe3af442ecd8ecf441124a6489f831a3 Mon Sep 17 00:00:00 2001 From: Klaus Aehlig Date: Mon, 30 May 2022 12:38:36 +0200 Subject: Built-in expressions: add enumerate Add a function transforming a list into a map. In this way, artifacts collected positionally in a list can easily be realized as a stage used for input to an action or output of a target. --- doc/concepts/expressions.org | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'doc/concepts') diff --git a/doc/concepts/expressions.org b/doc/concepts/expressions.org index 50737413..895b5e0a 100644 --- a/doc/concepts/expressions.org +++ b/doc/concepts/expressions.org @@ -211,6 +211,11 @@ those) argument(s) to obtain the final result. first non-negative integers. For example, ~{"type": "range", "$1": "3"}~ evaluates to ~["0", "1", "2"]~. +- ~"enumerate"~ The argument has to be a list. The result is a map + containing one entry for each element of the list; the key is the + decimal representation of the position in the list (starting from + ~0~) and the value is the element. + - ~"++"~ The argument has to be a list of lists. The result is the concatenation of those lists. -- cgit v1.2.3