Monads/List monad: Difference between revisions
m
→{{header|Raku}}: Fix comments: Perl 6 --> Raku
Thundergnat (talk | contribs) (Rename Perl 6 -> Raku, alphabetize, minor clean-up) |
SqrtNegInf (talk | contribs) m (→{{header|Raku}}: Fix comments: Perl 6 --> Raku) |
||
Line 587:
=={{header|Raku}}==
(formerly Perl 6)
In
Here's a simple, if contrived example. take the numbers from 0 to 9, add 3 to each, find the divisors of those sums and print the list of divisors for each sum... in base 2. Again, a bind function was implemented but it is more limited than if we just used map directly. The built in map method will work with either items or lists, here we need to implement a multi sub to handle either.
|