A mechanism for caching data with dependencies.
This is basically a performance-focused, lightweight implementation of pull-based <a href="http://en.wikipedia.org/wiki/Functional_reactive_programming">FRP</a>, pull-based meaning that in the chain A→B→C, an update to A doesn't affect C until the value of C is requested.
What does Px mean? I don't know, I just needed a name and I liked the way @lihaoyi's Rx type name looked in code.
You can consider this "Performance eXtension". If this were Java it'd be named
AutoRefreshOnRequestDependentCachedVariable.
- Companion
- object
Value members
Abstract methods
Revision of its value. Increments when value changes.
Revision of its value. Increments when value changes.
Concrete methods
If this Px contains a function, it can be extracted and the Px dropped from the signature. Every time the function
is invoked it will use the latest value of this Px, even if you don't explicitly hold a reference to it anymore.
If this Px contains a function, it can be extracted and the Px dropped from the signature. Every time the function
is invoked it will use the latest value of this Px, even if you don't explicitly hold a reference to it anymore.
Example. From a Px[Int => String], an Int => String can be extracted.