I wanted to make a method that took an integer or a string that looked like an integer. I thought a coercion type would work nicely for that. The Int […]
Read moreCategory: Types
Quick Tip #19: Build reusable data types
Perl 6 lets you constrain variable values with types, but you don’t have to limit yourself to the built-in types. Once defined, these act like the built-in types. Here are […]
Read moreQuick Tip #9: User-defined data types
Perl 6 has “gradual typing”. I can constrain values when I like, and let them run free otherwise. User-defined data types are one of the Perl 6 features that excite […]
Read more