packages feed

pointedlist 0.3.3 → 0.3.4

raw patch · 2 files changed

+5/−2 lines, 2 files

Files

Data/List/PointedList.hs view
@@ -172,12 +172,15 @@ -- | Move the focus to the specified element, if it is present. -- --   Patch with much faster algorithm provided by Runar Bjarnason for version---   0.3.2.+--   0.3.2. Improved again by Runar Bjarnason for version 0.3.3 to support+--   infinite lists on both sides of the focus. find :: Eq a => a -> PointedList a -> Maybe (PointedList a) find x pl = find' ((x ==) . focus) $ positions pl   where find' pred (PointedList a b c) =           if pred b then Just b                     else List.find pred (a ++ c)+        merge []     ys = ys+        merge (x:xs) ys = x : merge ys xs  -- | The index of the focus. index :: PointedList a -> Int
pointedlist.cabal view
@@ -1,5 +1,5 @@ Name:          pointedlist-Version:       0.3.3+Version:       0.3.4 Synopsis:      A zipper-like comonad which works as a list, tracking a position. Category:      Data Description: