[02:32] *** melezhik joined [02:45] *** melezhik left [10:19] yes, I figured something similar, e.g [(|)] [10:20] can operators defined as methods? [10:53] *** lizmat_ joined [10:54] *** TempIRCLogger__ joined [10:55] *** TempIRCLogger left [10:57] *** lizmat left [10:58] *** TempIRCLogger__ left [10:58] *** TempIRCLogger joined [11:21] also, how do I split an iterable into two based on a criteria? [12:02] perhaps with categorize? [12:02] *** lizmat_ left [12:03] *** lizmat joined [12:21] thank you, gotta try that [13:11] m: my (@filtered, @rest) := categorize(* %% 5, (1..90).pick: 5){True, False}; dd @filtered, @rest; [13:11] is there a better way to do this? [13:16] not at the moment, no [13:17] I guess we could make a Supply version of categorize, that would return a Supply of Supplies [13:18] lol [13:19] I kinda miss some decent pattern matching mechanism [13:19] when JS has that for years by now [13:19] much more than this slurp-slurp-slurpiness all around tbh [13:20] could you elaborate on that? maybe it's easy to make a module for it :-) [13:21] *** lizmat left [13:21] my (True => @filtered, False => @rest) := categorize(...) [13:21] would already feel much better [13:21] this is pretty much a transliteration of ES6 destructuring assignment [13:23] *** lizmat joined [13:23] *** TempIRCLogger__ joined [13:24] *** TempIRCLogger left [13:27] *** TempIRCLogger__ left [13:27] *** TempIRCLogger joined [15:42] @Nemokosch#9980 I'm working on a Christmas present for you. :) [15:44] 😯 [17:07] that's pretty good [20:24] m: my ($a, $b); :(:True($a), :False($b)) := ^10 .classify: * %% 2; dd $a; dd $b [20:24] rakudo-moar cb16f7ecc: OUTPUT: «$[0, 2, 4, 6, 8]␤$[1, 3, 5, 7, 9]␤» [20:24] m: my (@a, @b); :(:True(@a), :False(@b)) := ^10 .classify: * %% 2; dd @a; dd @b [20:24] rakudo-moar cb16f7ecc: OUTPUT: «Array element = [0, 2, 4, 6, 8]␤Array element = [1, 3, 5, 7, 9]␤» [20:26] Nemokosch: 👆this is also possible [21:33] *** qorg11 left [21:33] *** qorg11 joined [23:04] *** discord-raku-bot left [23:13] *** discord-raku-bot joined