You can try defining a subset type a bit like this: subset StrArrStrsPair of Pair where .key ~~ Str && .value ~~ Positional[Str];
Please be aware that the arrays have to be explicitly created with the type constant of Str for this to work. On 5 September 2019 14:34:05 CEST, 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 -- Sent from my Android device with K-9 Mail. Please excuse my brevity.