Portability | unknown |
---|---|
Stability | unstable |
Maintainer | Conrad Parker <conrad@metadecks.org> |
Safe Haskell | Safe-Inferred |
Delta encoding and decoding of numeric values.
- deltaEncode :: Num a => [a] -> [a]
- deltaDecode :: Num a => [a] -> [a]
Delta encoding
deltaEncode :: Num a => [a] -> [a]Source
Delta encode a list of numbers
> deltaEncode [1,2,3,2,4] [1,1,1,-1,2]
deltaDecode :: Num a => [a] -> [a]Source
Delta-decode a list of numbers
> deltaDecode [1,1,1,-1,2] [1,2,3,2,4]