Skip to content
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

lift should support non-observables #3801

Open
aplavin opened this issue Apr 24, 2024 · 0 comments
Open

lift should support non-observables #3801

aplavin opened this issue Apr 24, 2024 · 0 comments
Labels
enhancement Feature requests and enhancements

Comments

@aplavin
Copy link
Contributor

aplavin commented Apr 24, 2024

Currently, lift(f, x) only works if x is an observable, but errors (or does a completely different thing, because lift happens to be === map) for regular x values.

But it would be natural and convenient to make lift(f, x::Observable) = current behavior, and lift(f, x::Any) = f(x). This would enable preparing plotting arguments without manually handling observable and non-observable cases, like

# works no matter if x is a regular value or observable
y = lift(myfunc, x)
plot(y)
@aplavin aplavin added the enhancement Feature requests and enhancements label Apr 24, 2024
@t-bltg t-bltg changed the title lift should support non-observables lift should support non-observables Apr 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Feature requests and enhancements
Projects
None yet
Development

No branches or pull requests

1 participant