This issue is a discussion for contributors to collaborate in getting ready to be featured in 48in24. Please refer to this forum topic for more info.
We will be featuring Sieve from Mar 26 onwards.
Staff jobs
These are things for Erik/Jeremy to do:
Check/update exercise in Problem Specifications
Create + schedule video
Community jobs
For each track:
Implement Sieve
Add approaches (and an approaches introduction!) for each idiomatic or interesting/educational approach.
Add video walkthroughs (record yourself solving and digging deeper into the exercise).
Highlight up to 16 different featured exercises (coming soon)
Existing Approaches
You can use these as the basis for approaches on your own tracks. Feel free to copy/paste/reuse/rewrite/etc as you see fit! Maybe ask ChatGPT to translate to your programming language.
The reduction happens as a whole. The symmetric set difference operator in Raku has list associativity, and reduce in Raku makes use of an operator’s identity value and associativity: Operators | Raku Documentation
All of the sets in the list end up as arguments to a single subroutine call. Parentheses would be necessary if you did want to group them in a certain way.
For example, Perl and Raku both have an xor operator, but Perl’s is left associative, and Raku’s is list associative. 1 xor 1 xor 1 is true in Perl, but false in Raku, because the Raku equivalent of Perl’s behaviour is (1 xor 1) xor 1.
Yes you have the right idea for the sort. Under the hood, a set in Raku is a map where the keys are the elements, and the values are True, and initially those keys are not sorted.