Skip to content

Commit 8c28da9

Browse files
authored
Tutorial update (#153)
* tutorial update Signed-off-by: Mandana Vaziri <[email protected]> * tutorial update Signed-off-by: Mandana Vaziri <[email protected]> --------- Signed-off-by: Mandana Vaziri <[email protected]>
1 parent c5b9013 commit 8c28da9

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

docs/tutorial.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -328,9 +328,10 @@ Each list item can contain any PDL block (strings are shown here), and the resul
328328
Notice that block types that require lists (`repeat`, `for`, `if-then-else`) have the `lastOf` semantics by default. For more detailed discussion
329329
on this see [this section](#conditionals-and-loops).
330330
331-
The PDL interpreter will raise a warning for a list item inside a `lastOf` block that is not capturing the result in a variable definition, or contributing
332-
the result, meaning that the result is being ignored.
333-
If this is intended, the warning can be turned off by including `contribute: []` or `contribute: [context]` for that block.
331+
The PDL interpreter will raise a warning for a list item inside a `lastOf` block that is not capturing the result in a variable definition meaning that the result is being implicitly ignored.
332+
If this is intended because the block is contributing to the context or doing a side effect for example, the warning can be turned off by including `contribute: [context]` or `contribute: []`.
333+
On the other hand, if this was a mistake, then capture the result of the block using a variable definition by adding `def`.
334+
You could also turn the list into a text or an array by surrounding it with a `text` or `array` block so that no result is lost.
334335
335336
## Input from File or Stdin
336337

0 commit comments

Comments
 (0)