perl6.party | Source code for http : //perl6.party website | Web Site library
kandi X-RAY | perl6.party Summary
kandi X-RAY | perl6.party Summary
Source code for Perl6.Party website.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of perl6.party
perl6.party Key Features
perl6.party Examples and Code Snippets
Community Discussions
Trending Discussions on perl6.party
QUESTION
Is there a way to introspect a variable to directly find out what subset it was declared with? Here I create a subset, but introspection points me to its base type:
...ANSWER
Answered 2019-Nov-24 at 12:52The value that you stored in $x
is an Int
. It is acceptable to the container (which you typed to Prime
) because Prime
is a subtype of Int
.
So what you're interested in, is not the value in the container, but the type of the container. To get at the container, Perl 6 has the .VAR
method. And that has an .of
method to get at the type:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install perl6.party
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page