Module

Hylograph.Flow.Internal.Index

Package
purescript-hylograph-flow
Repository
afcondon/purescript-hylograph-flow

INTERNAL: no part of the library's interface, and free to change in any release. The three ways the library's own functions look a flow's arrays up without scanning them again for every element: values gathered under a key, how often each value occurs, and which occur more than once.

#gathered Source

gathered :: forall key value. Ord key => Array (Tuple key value) -> Map key (Array value)

Every value under its key, a key's values in the order they came. One sort by key and then by place, so that nothing rests on the sort's being stable and no array is appended to once for each value.

#under Source

under :: forall key value. Ord key => key -> Map key (Array value) -> Array value

What was gathered under a key; nothing, where the key was never met.

#tally Source

tally :: forall a. Ord a => Array a -> Map a Int

How many times each value occurs.

#repeated Source

repeated :: forall a. Ord a => Array a -> Array a

The values that occur more than once, each once, in the order of their first occurrence.