You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
That's entirely valid. However, it really is worth noting to the reader that in Raku, unlike Perl, constants can be lexically scoped with my just like a variable. Thus, the following works as you'd expect:
Inside of scopes where $A is already defined as a constant attempts to redefine $A will produce an error. It's worth mentioning this near ncitest.raku, where the first use of constants occurs in the guide. Given the importance of read-only variables to Functional Programming, it's worth reiterating in that section too.
The text was updated successfully, but these errors were encountered:
In ncitest.raku a constant is defined like this:
That's entirely valid. However, it really is worth noting to the reader that in Raku, unlike Perl, constants can be lexically scoped with
my
just like a variable. Thus, the following works as you'd expect:The result is:
Inside of scopes where
$A
is already defined as a constant attempts to redefine$A
will produce an error. It's worth mentioning this near ncitest.raku, where the first use of constants occurs in the guide. Given the importance of read-only variables to Functional Programming, it's worth reiterating in that section too.The text was updated successfully, but these errors were encountered: