On Sat, Jun 13, 2020 at 10:21 AM Brad Gilbert <b2gi...@gmail.com> wrote:

> That was just a dumb example.
> An incredibly dumb example.
>
> So what happens is that `Bool.pick` chooses The Bool values of either
> `True` or `False`.
> It does this at every position in the string.
>
>     'TrueFalse' ~~ / <{ Bool.pick }>
>

I saw this and figured that maybe a state variable could help:

    'TrueFalse' ~~ /<{ $ //= Bool.pick }>/

...but it doesn't.  I suppose that means the bracketed code is not compiled
just once, like an anonymous subroutine, but is fully re-evaluated on every
match attempt.  Is that the intended behavior?

Reply via email to