01:22 Manifest0 left 03:06 human-blip joined 06:31 sivoais_ left 06:42 sivoais joined 08:00 ACfromTX left 08:45 Manifest0 joined 08:59 dakkar joined 09:51 lizmat_ joined 09:54 lizmat left 10:00 lizmat_ left, lizmat joined 17:37 dakkar left
lizmat and yet another Rakudo Weekly News hits the Net: rakudoweekly.blog/2024/11/04/2024-43-one-of-21/ 17:41
18:21 sivoais left 18:32 sivoais joined
.ohnowendigo I have a list, like my $proc = <1 0 3>, and am trying to produce every possible list that can be made by subtracting 1 from any number of nonzero indices, like <0 0 3>, <1 0 2>, <0 0 2>. I have this code so far: for $proc.grep(* > 0, :k).combinations(1..*) -> @x { my $new = $proc.clone; $new[@x]>>--; @queue.push($new); } it works, but I don't like having to clone proc and 20:09
then mutate the clone. Is there a way I can do this "purely"?
ab5tract ohnowhendigo: I’m not sure I understand your requirements enough to help. But this seems like something you would normally do recursively if you are concerned about purity 22:38