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: Subroutines
Quick Tip #18: Short circuit subroutines with multi
In yesterday’s Quick Tip I used the Fibonacci sequence as an example to show off Rakudo’s –profile option. In today’s tip I’ll use that same sequence to show off Perl […]
Read moreQuick Tip #15: Phasers
Perl 6 has phasers, which are subroutines that run at particular times despite their spatial placement inside the the program text. As a program moves from one thing to another, […]
Read moreQuick Tip #13: Kapreker’s Constant
A Kaprekar’s Constant is the number you end up with when you repeatedly substract the descending digits of a four digit number from the ascending digits. This is mostly a […]
Read moreRestrain return values
The utility of Perl 6 (or any language) is something that I can’t already do. When people ask me if they should use Perl 6 (or even regular Perl), I […]
Read more