Nested functions can be confusing and unclear to a new user. For example I wanted to run a if check on the output of a foreach - so I try to use if inside foreach as shown in following code"
So I expect that based on the logic, a noop or whalesay operation will be invoked, but the output of everything below inputs of the foreach is emitted as a text output.
Nested functions can be confusing and unclear to a new user. For example I wanted to run a
if
check on the output of aforeach
- so I try to use if inside foreach as shown in following code"So I expect that based on the logic, a
noop
orwhalesay
operation will be invoked, but the output of everything belowinputs
of theforeach
is emitted as a text output.The limitations of nested functions should be called out clearly or an example of nested function should be provided.
In this case, since nested if does not work, the user has to write a small function and do same if check and then pass on the data.