[00:01] actually scratch that [00:01] how to do the following: $potentially-nil.?Str [00:01] as in "stringify if defined, else nil" [00:04] .defined ?? .Str !! Nil given $potentially-nil; I guess [00:27] my $potentially-nil andthen .Str [00:27] technically, (my $potentially-nil andthen .Str) || Nil [00:28] er [00:28] my $potentially-nil andthen .Str orelse Nil [00:29] `git blame whoever-did-nil's-str-method` :sob: [00:43] *** frost joined [00:50] m: put (my $potentially-nil andthen .Str) [00:50] rakudo-moar 214366a13: OUTPUT: «␤» [00:51] m: dd (my $potentially-nil andthen .Str) [00:51] rakudo-moar 214366a13: OUTPUT: «Empty␤» [00:51] an empty list coerces to an empty string [00:54] it was going into a pair, but then I found out empty pairs are just still pairs [00:54] but then i solved everything [00:54] method AT-KEY( $key where { NIC.parse: $_ } ) { [00:54] &!constructor( | $/.hash>>.Str ); [00:54] }; [03:15] *** Guest35_ left [06:14] *** archenoth is now known as arch [06:20] *** frost left [08:08] *** dakkar joined [08:14] *** frost joined [09:36] *** jaguart joined [11:10] *** frost left [11:57] *** discord-raku-bot left [11:57] *** discord-raku-bot joined [13:14] *** discord-raku-bot left [13:14] *** discord-raku-bot joined [13:24] *** discord-raku-bot left [13:24] *** discord-raku-bot joined [13:52] *** dakkar left [13:53] *** jaguart left [14:03] *** Guest35_ joined [14:29] *** Kaipei joined [14:33] *** Kaiepi left [15:02] *** Kaipei is now known as Kaiepi [16:24] *** qorg11 left [19:22] I want to specify Whatever or Nil as values for CLI arguments. Right now make those arguments of type Str and check are the given values in . Is there are a better or more concise approach? [19:34] multi MAIN("Whatever") { } multi MAIN("Nil") { } ?? [19:38] @lizmat Yes, that works for me. I use(d) it. I was thinking something like MAIN( Str :$arg1 = v1, :$arg2 = Whatever where * ~~ Str || * ∈ (Whatever Nil), Num :$arg = 12) [19:44] *** jaguart joined [21:33] *** kueppo joined [21:36] How do I `take` a list by elements? [21:38] `.take for @list` definitely works, is there something better? [21:59] m:``` [21:59] dd gather for <1 2 3>, <4 5 6> { take |@^xs } [21:59] ``` [22:07] yes, this doesn't seem to actually flatten.. [22:33] *** jaguart left [23:27] *** kueppo left