Portability | non-portable (TF,GNTD) |
---|---|
Stability | experimental |
Maintainer | hans@hanshoglund.se |
Safe Haskell | None |
- data Stretched a
- stretched :: Iso (Duration, a) (Duration, b) (Stretched a) (Stretched b)
- stretchedValue :: (Transformable a, Transformable b) => Lens (Stretched a) (Stretched b) a b
Stretched values
A Stretched
value has a known duration
, but no position
.
Placing a value inside Stretched
makes it invariant under delay
, however the inner
value can still be delayed using
.
fmap
delay
Construction
stretched :: Iso (Duration, a) (Duration, b) (Stretched a) (Stretched b)Source
View a stretched value as a pair of the original value and a stretch factor.
stretchedValue :: (Transformable a, Transformable b) => Lens (Stretched a) (Stretched b) a bSource
View a stretched value as a pair of the original value and the transformation (and vice versa).