package incr_select
Install
Dune Dependency
Authors
Maintainers
Sources
sha256=c17e196a70e52030fb595eafb23e1602dfeb0f3999061f834bae73ffbb9854e9
md5=a8728136499a2cd813ec09bcbd4aeb7a
doc/incr_select/Incr_select/index.html
Module Incr_select
This module provides the ability to create a large set of incremental outputs based on a single incremental input, where some subset of the outputs are selected to have specific values, and the remainder are left with a specified default value. The outputs are updated in time proportional to the number of outputs that are changed, independent of the number of outputs that exist. Each function returns a staged function for allocating new output incrementals.
Note that it's possible that no incremental output is actually instantiated for the node that is selected, which is not a problem. Also, one can have more than one incremental that reflects the same output.
An example of where this is useful is for managing focus in a UI, where you want a single value to determine where the focus is, and many individual incrementals for determining whether a given sub-component is in focus.
module Make (Incr : Incremental.S_gen) : sig ... end