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

document delayed #17

Open
shashi opened this issue Aug 19, 2020 · 1 comment
Open

document delayed #17

shashi opened this issue Aug 19, 2020 · 1 comment

Comments

@shashi
Copy link
Owner

shashi commented Aug 19, 2020

Just to think over what would happen if users start to use delayed a la carte:

  1. mapvalues -- returning delayed(f)(x) is completely OK. The chaining of lazy values should work as expected. Calling delayed functions with other values which may themselves be delayed is OK. But calling it with say an array of delayed values is not.
  2. mapsubtrees -- returning delayed(f)(x) will work but not when f(x) is a FileTree. However, a FileTree with delayed values is OK.
  3. reducevalues -- seems fine again. as in 1.

cc @DrChainsaw

@shashi
Copy link
Owner Author

shashi commented Aug 19, 2020

Maybe users want to apply a function such that

  • if any of the inputs are lazy, make the output lazy
  • if any none of them are lazy, just compute it.

This is done internally by FileTrees.lazy_if_lazy(f) but I don't know if we should just export that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant