Welcome to Day 11 of the Perl 6 One-Liner Advent Calendar! Today, the calendar post is totally devoted to the solution of problem 34 of Project Euler. Once again, let me warn you to pause reading if you want to find your own solution prior to seeing mine. So, the task is to find the … Continue reading “๐ 11/25. Solving the Problem 34 in Perl 6”
Category: Raku One-Liners
๐ 10/25. Reduction operator in Perl 6
Welcome to Day 10 of the Perl 6 One-Liner Advent Calendar! Today, there will be three one-liners instead of a regular one. Our todayโs guest is a reduction construction with a pair of square brackets. When they do not surround an array index, they work in a completely different field. Example 1 The most classical … Continue reading “๐ 10/25. Reduction operator in Perl 6”
๐ 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”