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
if we clone the iterator "fully" (as in, the code inside of the iterator body is cloned) then we will duplicate effectful actions which might be enclosed in the iterator body. for example, we might read from Holochain to get the next value, or we might pull from the network 😱. so if we have 2 copies of the iterator, they would do these effectful actions twice. this could be a problem...
one way to mock-up "purity" (or rather, only singular execution of effects) is to have a cache which saves values once they are pulled from the iterator. thus, once we duplicate an iterator, it would only ever read from the cache, so the effect only occurs once.
in a recent meeting we decided that it's ok to duplicate effects for Holochain, so I dropped this. documenting it here in case we want to revisit in the future.
currently:
change to
Value
The text was updated successfully, but these errors were encountered: