On Mon, Jun 6, 2016 at 2:12 PM, Eduardo Cavazos <wayo.cava...@gmail.com> wrote:
>
>     with_alt Point.new { .x = 10; }
>
> would return a Point.
>
> And this:
>
>     (with_alt Point.new {.x = 10}; with_alt Point.new {.y = 20})

For your particular case, would it be sufficient to set the values in
the constructor?

with Point.new( :x(10) ) { .say }
  # says "Point.new(x => 10, y => Any)"

with Point.new( :x(10) ), Point.new( :y(20) ) { .perl }
  # says "(Point.new(x => 10, y => Any), Point.new(x => Any, y => 20))"

It's not the general solution, but it does the trick for the examples.

-y

Reply via email to