develooper Front page | perl.perl6.users | Postings from September 2019

Typed Pairs

Thread Next
From:
Mikkel
Date:
September 5, 2019 12:34
Subject:
Typed Pairs
Message ID:
CANUJ3NpmpH8zoQiV1xEcjw2Lp=R2Fz-E__LkUGLRysgqrni6Qw@mail.gmail.com
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

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About