package incr_select

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

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) : sig ... end
OCaml

Innovation. Community. Security.