diff --git a/www/content/tutorial.md b/www/content/tutorial.md index f3549fa625..a282b47e7c 100644 --- a/www/content/tutorial.md +++ b/www/content/tutorial.md @@ -440,6 +440,12 @@ You can give `dbg` any expression you like, for example: dbg Str.concat singular plural ``` +You can also use `dbg` as a function inside an expression, which will print the function argument to stderr and then return the argument to the caller. For example: + +```roc +inc = \n -> 1 + dbg n +``` + ### [Tuples](#tuples) {#tuples} One way to have `dbg` print multiple values at a time is to wrap them in a record: