package DX::Op::Cut;

use Moo;

with 'DX::Role::Op';

sub run {
  my ($self, $state) = @_;
  my $up = $state->return_stack->[-1][1];
  die "Nowhere to cut to" unless $up;
  $state->but(last_choice => $up->last_choice)->then($self->next);
}

1;
