packages feed

zipper-extra 0.1.0.0 → 0.1.0.1

raw patch · 2 files changed

+4/−4 lines, 2 files

Files

src/Control/Comonad/Zipper/Extra.hs view
@@ -1,5 +1,5 @@ module Control.Comonad.Zipper.Extra (-  Control.Comonad.Store.Zipper.Zipper(..)+  Control.Comonad.Store.Zipper.Zipper , Control.Comonad.Store.Zipper.zipper , Control.Comonad.Store.Zipper.zipper1 , Control.Comonad.Store.Zipper.unzipper@@ -26,7 +26,7 @@ zipperPreviousMaybe :: Zipper t a -> Maybe a zipperPreviousMaybe xs = if pos xs > 0 then Just (peeks (+ (-1)) xs) else Nothing --- Return a list of elements within 'r' hops either side of the zipper target.+-- | Return a list of elements within 'r' hops either side of the zipper target. zipperWithin :: Int -> Zipper t a -> [a] zipperWithin r xs = (`peek` xs) <$>  [(max 0 (pos xs - r)) .. (min (size xs -1) (pos xs + r))] 
zipper-extra.cabal view
@@ -4,10 +4,10 @@ -- -- see: https://github.com/sol/hpack ----- hash: b0fdea70ba7b0a6ac82f3d0b44aab0a37a27b09a0e43afb72cc42cdf53716b56+-- hash: fa71157dc7a8376ed0e8f8a20812d39df880a96a1eda7888c3ae86b87c2e18a9  name:           zipper-extra-version:        0.1.0.0+version:        0.1.0.1 synopsis:       Zipper utils that weren't in Control.Comonad.Store.Zipper description:    Adds some utility functions for and reexports Control.Comonad.Store.Zipper category:       Comonads