🎄 9/25. More on X, .., and … in Perl 6

Welcome to Day 9 of the Perl 6 One-Liner Advent Calendar! On Day 6, we had a construct with a cross-operator, (999…100) X* (999…100). Today, we’ll dive into a similar construction from November: 1..10 X* 1..10 It prints the items of the product table for the numbers from 1 to 10: (1 2 3 4 … Continue reading “🎄 9/25. More on X, .., and … in Perl 6”

🎄 8/25. Adding up even Fibonacci numbers in Perl 6

Welcome to Day 8 of this year’s Perl 6 One-Liner Advent Calendar. It is about ¼ of the whole series, and don’t forget that you can type ¼ instead of 0.25 in Perl 6! Today, we are solving problem 2 from Project Euler. The task is to find the sum of all even Fibonacci numbers below four … Continue reading “🎄 8/25. Adding up even Fibonacci numbers in Perl 6”

🎄 7/25. The joy of Unicode in Perl 6

Welcome to Day 7 of the Perl 6 One-Liner Advent Calendar! Today, we’ll look at the month of March in the Perl 6 Calendar 2019: The code here is using three characters outside of the ASCII land. We can even add one more: say π × $𝜌² In Perl 6, you can freely use Unicode … Continue reading “🎄 7/25. The joy of Unicode in Perl 6”