Documentation for trait is default (Variable)
Documentation for trait is default (Variable), assembled from the following types:
multi sub trait_mod:<is>(Variable, :!)
Sets the default value with which a variable is initialized, and to which it is reset when Nil is assigned to it. Trait arguments are evaluated at compile time. Closures won't do what you expect. They are stored as is and need to be called by hand.
my Int is default(42);say ; # OUTPUT: «42␤»= 5;say ; # OUTPUT: «5␤»# explicit reset:= Nil;say ; # OUTPUT: «42␤»