You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In some cases, one would want to evaluate value only if needed.
I was thinking about using FluentValue::Custom for that, but at the most naive approach using simple closure may not work, because it needs duplicate.
To workaround that we could either make our own closure type aka struct of Args and fn and in duplicate, we would duplicate Args and fn.
But alternatively, I think it depends on how 'duplicate' is used, because we may also consider just evaluating closure in duplicate and returning a resulting value.
The text was updated successfully, but these errors were encountered:
In the process of implementing it via FluentValue::Custom and during implementing FluentType for LazyValue, I found that FluentValue doesn't implement FluentType. Shouldn't it? 🤔
In some cases, one would want to evaluate value only if needed.
I was thinking about using FluentValue::Custom for that, but at the most naive approach using simple closure may not work, because it needs
duplicate
.To workaround that we could either make our own closure type aka struct of
Args
andfn
and in duplicate, we would duplicate Args and fn.But alternatively, I think it depends on how 'duplicate' is used, because we may also consider just evaluating closure in duplicate and returning a resulting value.
The text was updated successfully, but these errors were encountered: