That would be `List`
sub RtnOrd( Str $Char --> List ){ $Char, ord($Char) }
say RtnOrd "A"
# (A 65)
On Fri, Oct 12, 2018 at 3:14 PM ToddAndMargo via perl6-users <
[email protected]> wrote:
> >> On Fri, Oct 12, 2018 at 3:32 PM ToddAndMargo via perl6-users
> >> <[email protected] <mailto:[email protected]>> 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
>
> On 10/12/18 12:52 PM, Curt Tilmes wrote:
> > 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) ...
>
>
> I am confused.
>
> I want to get the --> syntax correct for `return $Char, ord($Char)`
>