method serial
1 | class Any |
1.1 | (Any) method serial |
2 | class HyperSeq |
2.1 | (HyperSeq) method serial |
3 | class RaceSeq |
3.1 | (RaceSeq) method serial |
Documentation for method serial
assembled from the following types:
class Any
From Any
(Any) method serial
Defined as
multi method serial()
This method is Rakudo specific, and is not included in the Raku spec.
The method returns the self-reference to the instance itself:
my ; # defaults to Anysay .serial.^name; # OUTPUT: «Any»say .^name; # OUTPUT: «Any»my = 'food';.serial.say; # OUTPUT: «food»
This is apparently a no-op, as exemplified by the third example above. However, in HyperSeq
s and RaceSeq
s it returns a serialized Seq
, so it can be considered the opposite of the hyper/race
methods. As such, it ensures that we are in serial list-processing mode, as opposed to the autothreading mode of those methods.
class HyperSeq
From HyperSeq
(HyperSeq) method serial
multi method serial(HyperSeq:)
Converts the object to a Seq
and returns it.
class RaceSeq
From RaceSeq
(RaceSeq) method serial
multi method serial(RaceSeq:)
Converts the object to a Seq
and returns it.