See Original text in context
method parents(, :, :)
Returns the list of parent classes. By default it stops at Cool, Any or Mu, which you can suppress by supplying the :all
adverb. With :tree
, a nested list is returned.
;is D ;is D ;is C1 is C2 ;is B ;say A.^parents(:all).raku;# OUTPUT: «(B, C1, C2, D, Any, Mu)»say A.^parents(:all, :tree).raku;# OUTPUT: «[B, ([C1, [D, [Any, [Mu]]]], [C2, [D, [Any, [Mu]]]])]»