this looks like two questions- typing Array contents - see Typing <https://docs.perl6.org/language/list#___top> Syntax is "my @bucket of TypedThings;"
typing a Pair > my Pair[Str, Array[Str]] $x; ===SORRY!=== Error while compiling: An exception occurred while parameterizing Pair at <unknown file>:1 Exception details: ===SORRY!=== Error while compiling: Pair cannot be parameterized ------> my Pair[Str, Array[Str]]⏏ $x; Yep doesn't work! Must be a way, I don't know it... -y On Thu, Sep 5, 2019 at 5:34 AM Mikkel <mikkelst...@gmail.com> wrote: > Hello > > I am wondering whether it is possible to define a Pair with a key and a > value of a specific class. > > Suppose I want an Array of Pairs with keys as Str and values as Array of > Str called "properties". And define it as a instance variable.Something of > the likes: > > has Pair[Str, Array[Str]] @!properties; > > Except this wont work. > > > Best regards > Mikkel >