lord / anchors

self adjusting computations in rust
130 stars 5 forks source link

What would be the right way of using a scan operator? #44

Open GDX64 opened 1 year ago

GDX64 commented 1 year ago

If the history of changes is important, how can I use it to derive the new values? The closest I saw of an accumulator was map_mut, but it loses values in between if I don't poll for changes.

lord commented 11 months ago

i think this library's architecture fundamentally doesn't work if you care about the history of values. see https://blog.janestreet.com/breaking-down-frp/

GDX64 commented 11 months ago

I've read it before, I've seen it on the readme of the repo :) . Is it possible to mutate the value of the signal with a function? Kind of like what leptos does.

fn with<F: FnOnce(&mut T)>(&mut self, f: F)