-
Notifications
You must be signed in to change notification settings - Fork 171
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Let's make Ternary able to have the same sticky value for each evaluation #1475
Labels
Comments
@0crat assign me |
victornoel
added a commit
to victornoel/cactoos
that referenced
this issue
Sep 27, 2020
This was referenced Sep 27, 2020
victornoel
added a commit
to victornoel/cactoos
that referenced
this issue
Oct 4, 2020
victornoel
added a commit
to victornoel/cactoos
that referenced
this issue
Dec 27, 2020
victornoel
added a commit
to victornoel/cactoos
that referenced
this issue
Dec 28, 2020
baudoliver7
pushed a commit
to baudoliver7/cactoos
that referenced
this issue
Jan 8, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Since most of the cactoos classes are lary-evaluated, sometimes when using
Ternary
, each call to each of theScalar
it holds in its state will result of a different evaluation of the input value.For example, the meaning of the following is not very clear:
It is currently possible to write:
But it forces us to evaluate scl, which goes against the idea of only composing objects. This means we can't use it in constructors for example where we want to avoid code in them.
Instead, we would like to be able to write:
With
i
being stable the wholevalue()
evaluation.It would be for example useful to tackle #1460.
The text was updated successfully, but these errors were encountered: