Course of Raku / Advanced /
Debugging / Debugging with dd / Exercises / Dump a typed variable
Solution: Dump a typed variable
Here is a possible solution to the task.
Code
my Int $n = 42;
dd $n;🦋 You can find the source code in the file dump-typed.raku.
Output
Int $n = 42Comments
Because the variable has a declared type,
ddprints that type before the name:Int $n = 42.An untyped variable would be dumped as just
$n = 42, without the type.