Refining values over time


#1

Originally published at: https://purelyfunctional.tv/core-async-patterns/refining-values-over-time/
core.async lets us do things to play with time that we otherwise would have a lot of trouble with. One thing we might want is to request a value that is always current. We don’t know when we’ll need it, but when we access it, we want it to be as up-to-the-minute as possible. This pattern uses a channel whose values are refined over time. We can then store those values into an atom, which will always have the most recent and hence most refined value.