| Safe Haskell | Safe-Inferred | 
|---|---|
| Language | GHC2021 | 
StreamPatch.Patch.Linearize.Insert
Documentation
linearize :: (Integral sf, Integral st) => (a -> sf) -> (st -> a -> b) -> [a] -> Either (a, a) (Maybe (a, [b])) Source #
Linearize some list of as.
For non-empty lists, the result is a tuple of the first a, followed by the
 linearized as (converted to b). Linearized values are non-negative, so
 natural-like types are safe to use for st.