10 Oct
2008
10 Oct
'08
8:57 a.m.
I was surprised to find there was no simple zipper for [] on hackage, so I made one: http://hackage.haskell.org/cgi-bin/hackage-scripts/package/ListZipper-1.1.0.... (1.0.0.0 had a dumb bug where I switched right and left!) Example in ghci: Prelude Data.List.Zipper> let z = fromList [1,2,3] Prelude Data.List.Zipper> toList (replace 5 $ right z) [1,5,3] -- ryan