|
This channel is intended for people just starting with the Raku Programming Language (raku.org). Logs are available at irclogs.raku.org/raku-beginner/live.html Set by lizmat on 8 June 2022. |
|||
|
02:20
teatwo joined
02:24
tea3po left
03:35
teatwo left
05:24
teatime joined
07:43
Manifest0 joined
08:36
habere-et-disper joined
|
|||
| habere-et-disper | OK, I'm confused. This works as expected: | 08:38 | |
| m: say map { $_, [*] $_ }, (3,4), (5,6) | |||
| camelia | (((3 4) 12) ((5 6) 30)) | ||
| habere-et-disper | But then this doesn't: | ||
| m: say map { $_, [*] $_ }, (3,4) | |||
| camelia | ((3 3) (4 4)) | ||
| habere-et-disper | No luck if I try and convince with: | ||
| m: say map { $_, [*] $_ }, (3,4).List | |||
| camelia | ((3 3) (4 4)) | ||
| habere-et-disper | Except in prefix form: | 08:39 | |
| m: say map { $_, [*] $_ }, List.new: (3,4) | |||
| camelia | (((3 4) 12)) | ||
| habere-et-disper | What is going on ?! | ||
| Nemokosch | what are you even trying to do? | 08:49 | |
| habere-et-disper | Given a thing, return it, followed by the reduction of it (by multiplication) | 08:50 | |
| Nemokosch | Oh | 08:51 | |
| well, something.List is fundamentally different from List.new: something | 08:52 | ||
| habere-et-disper | That's new to me. | ||
| Nemokosch | the former is a conversion, and something that is already a List, will be converted into a List as itself | ||
| that's more or less the same reason the [] of arrays is actually idempotent | 08:53 | ||
| [[[1, 2, 3]]] is exactly the same as [1, 2, 3] | |||
| because at its heart, that's also a conversion, not a construction with listed elements (for the better or worse) | 08:54 | ||
| habere-et-disper | (y) | 08:59 | |
|
10:39
habere-et-disper left
12:52
john212 joined
12:56
john212 left
|
|||
| librasteve | m: say map { $, [*] $ }, ((3,4),) | 13:31 | |
| Raku eval | (((3 4) 12)) | ||
| librasteve | its the comma that makes a list, not the parens and your map is over a List of Lists | 13:32 | |
|
14:16
teatime left
14:17
teatime joined
14:22
teatwo joined
14:23
teatwo left,
teatwo joined
14:25
teatime left
14:28
teatwo left,
teatwo joined
19:06
MasterDuke left
19:25
MasterDuke joined
|
|||