Ok, it works with a $^var in place of $x in the where block.    Should
the parameter be visible there under its declared name?  If not, then
this is clearly just pilot error, and never mind...

On Wed, Dec 24, 2008 at 6:47 PM, Mark J. Reed <markjr...@gmail.com> wrote:
> I thought this would work:
>
> multi th($x where { $x % 10 == 1 }) { "{$x}st" }
> multi th($x where { $x % 10 == 2 }) { "{$x}nd" }
> multi th($x where { $x % 10 == 3 }) { "{$x}rd" }
> multi th($x) { "{$x}th" }
>
> say th(22)
>
> but it yields "22th".  Is this a Rakudo bug or me not understanding
> how constraints work?
>
> --
> Mark J. Reed <markjr...@gmail.com>
>



-- 
Mark J. Reed <markjr...@gmail.com>

Reply via email to