Thanks for all the answers. This will get me going. I was unaware of the ' Hash[Int, Str]' type of declarative syntax. I knew Hash[Str] was a thing but was unaware of the '[Int,Str]' type of syntax.
Thanks for the insight! On Sat, Feb 1, 2020 at 11:16 AM Elizabeth Mattijsen <l...@dijkmat.nl> wrote: > subset PhoneNumber of Int where *.chars == 9; # or any other > constraint > constant PhoneBook = Hash[PhoneNumber, Str]; # no need to make a > class, a type suffices > > my %pb is PhoneBook = foo => 123456789; > dd %pb; # (my PhoneNumber %{Str} = :foo(123456789)) -- __________________ :(){ :|:& };: