On Fri, Oct 12, 2018 at 3:32 PM ToddAndMargo via perl6-users < perl6-us...@perl.org> wrote:
> > But this does not? > > $ p6 'sub RtnOrd( Str $Char --> Str, Int ){return $Char, > ord($Char)}; say RtnOrd "A";' > > ===SORRY!=== Error while compiling -e > Malformed return value (return constraints only allowed at the end > of the signature) > at -e:1 > ------> sub RtnOrd( Str $Char --> Str⏏, Int ){return $Char, > ord($Char)}; say R > You could make a subset for the List your're trying to return: subset liststrint of List where .[0] ~~ Str && .[1] ~~ Int; sub RtnOrd( Str $Char --> liststrint) ...