5 has id => (is => 'ro', required => 1);
7 has root_set => (is => 'ro', predicate => 1);
10 is => 'lazy', predicate => 1, clearer => 1,
13 $self->root_set->to_stream;
17 has bound_value => (is => 'lazy', predicate => 1, clearer => 1, builder => sub {
18 if (defined(my $next = $_[0]->bound_stream->next)) {
21 DX::State->return_from_op('backtrack');
27 $self->has_bound_value || $self->has_bound_stream || $self->has_root_set;
31 my ($self, $stream) = @_;
32 $self->new(%$self, bound_stream => $stream);
36 my ($self, $stream) = @_;
37 $self->new(%$self, bound_value => $stream);
41 my ($self, $set) = @_;
42 $self->new(%$self, root_set => $set);
47 ref($self)->new(%$self);