problem-solving
problem-solving copied to clipboard
🦋 Problem Solving, a repo for handling problems that require review, deliberation and possibly debate
Some history about `.flatmap`. Before the Great List Refactor (GLR) the `.flatmap` method had slightly different semantics than it has now. Probably as part of the GLR, @jnthn [changed it...
The details are a bit fuzzy now, and IRC searches have not clarified much, but I remember heavily advocating for moving the behavior of `-e` invocations from `no strict` to...
## Minimal Example ```raku sub foo(Int @a) { dd @a; } foo [1, 2, 3]; # Type check failed in binding to parameter '@a'; expected Positional[Int] but got Array ([1,...
say √25; # expect 5 say √π; # expect 1.77245... say ∛27; # expect 3 say ∜16; # expect 2 sub prefix:(Numeric $n) { $n.sqrt } Others are beyond my...
As a follow up on https://github.com/Raku/problem-solving/issues/424: In the core c setting, the 10 most often occurring opcodes with a string index are: ``` $ bceval c '.map({.name if .operands.first("str")}).Bag.sort(-*.value).head(10)' dispatch_o...
See discussion at https://github.com/rakudo/rakudo/issues/2089 and the issue https://github.com/rakudo/rakudo/issues/2088.
Inspired by https://github.com/rakudo/rakudo/issues/2797 This would allow: ``` % raku -e 'sub foo(:@bar) { dd @bar }; foo :bar' Type check failed in binding to parameter '@bar'; expected Positional but got...
And it would make things a lot simpler if it were to be removed. Or at least have better documentation about its functionality.
Recently I tried this code as part of a [blog post](https://rakujourney.wordpress.com/2024/10/12/raku-burritos/) ``` use Definitely; enum Meat ; enum Ingredient ; sub returnBurrito($meat, @ingredients) { $meat, @ingredients } sub tortilla {...
… Modern popular or important repositories are not readily found when perusing the site. For example, this site is well down the current list of all 60+ repositories. The current...