In raku documentation for class Slip (https://docs.raku.org/type/Slip) and also in "Lists, sequences, and arrays" documentation (slips section: https://docs.raku.org/language/list), it is stated that "slip", "Slip (method)" and "| (prefix)" can be used to create slips but they behave slightly "different".
The thing is that I've tried to confirm the above statement but with disappointing results.
I run the following tests to find out the differences:
my $l = (1, 2, 3);
say (0, slip($l, 4)).perl;
say (0, ($l, 4).Slip).perl;
say (0, |($l, 4)).perl;
say '------------------------------';
say (slip($l, 4)).perl;
say (($l, 4).Slip).perl;
say (|($l, 4)).perl;
say '------------------------------';
say (0, slip($l)).perl;
say (0, ($l).Slip).perl;
say (0, |($l)).perl;
say '------------------------------';
say (0, slip $l).perl;
say (0, $l.Slip).perl;
say (0, |$l).perl;
say '------------------------------';
say (slip $l).perl;
say ($l.Slip).perl;
say (|$l).perl;
and the results are the same for all three of them:
(0, $(1, 2, 3), 4)
(0, $(1, 2, 3), 4)
(0, $(1, 2, 3), 4)
------------------------------
slip($(1, 2, 3), 4)
slip($(1, 2, 3), 4)
slip($(1, 2, 3), 4)
------------------------------
(0, 1, 2, 3)
(0, 1, 2, 3)
(0, 1, 2, 3)
------------------------------
(0, 1, 2, 3)
(0, 1, 2, 3)
(0, 1, 2, 3)
------------------------------
slip(1, 2, 3)
slip(1, 2, 3)
slip(1, 2, 3)
Is there a catch or is it a documentation bug?