5 has id => (is => 'ro', required => 1);
7 has bound_stream => (is => 'ro');
9 has bound_value => (is => 'lazy', predicate => 1, clearer => 1, builder => sub {
10 if (defined(my $next = $_[0]->bound_stream->next)) {
13 DX::State->return_from_op('backtrack');
17 has action => (is => 'ro');
21 $self->has_bound_value || $self->bound_stream;
25 my ($self, $stream) = @_;
26 $self->new(%$self, bound_stream => $stream);
30 my ($self, $stream) = @_;
31 $self->new(%$self, bound_value => $stream);
35 my ($self, $action) = @_;
36 $self->new(%$self, action => $action);
41 ref($self)->new(%$self);