03:06 arkiuat left 03:09 arkiuat joined 03:13 arkiuat left 03:25 arkiuat joined 05:21 halloy9957 joined 06:14 timo2 left 06:17 timo2 joined 06:31 halloy9957 left 06:55 arkiuat left 06:59 arkiuat joined 07:04 arkiuat left 07:23 arkiuat joined 07:28 arkiuat left 07:57 arkiuat joined 08:02 arkiuat left 08:30 arkiuat joined 08:35 arkiuat left 09:04 arkiuat joined 09:08 arkiuat left 09:31 arkiuat joined 09:36 arkiuat left 10:05 arkiuat joined 10:13 arkiuat left 10:32 arkiuat joined 10:37 arkiuat left 10:49 swaggboi left 11:06 arkiuat joined 11:11 arkiuat left 11:33 arkiuat joined 11:40 arkiuat left 11:53 arkiuat joined 12:58 arkiuat left 13:11 arkiuat joined 13:15 arkiuat left 13:34 arkiuat joined 13:39 arkiuat left 13:57 arkiuat joined
simon_sibl Is this good or there is a short better way more idiomatic to create a hash from array “array.map({key, value}).flat” ? 15:13
For example if the array contains text and the value should be the checksum of it
To have a hash word -> hash
librasteve `%(@a.map: { $ => cs($) }) 15:18
or my Hash() %h = @a.map: { $_ => cs($_) } 15:19
is that what you haev in mind?
lizmat my %h = array.kv ? 15:22
librasteve oh - sorry no need for the Hash() type coercion in my second example 15:26
simon_sibl Ah the arrow alright, indeed looks better, thanks ! 15:29
The hash isn’t in the base array, that is to be computed in the map or a for loop 🙏 15:30
librasteve yeah, similar idea to , is the operator that makes a List my @a = 1,2,3; the fat arrow => makes a Pair (then we need the assignment with %hash on the LHS to stick our List of Pairs into a Hash) 15:47
hopefully you get the idea that cs() is shorthand for your checksum maker sub 15:48