@hackage / text-zipper-monad

Monadic interface to the text-zipper package

Latest0.2.0.0

About

Metadata

  • Last updated , by kseo
  • License BSD-3-Clause
  • Categories Text Processing
  • Maintained by: kwangyul.seo@gmail.com

  • Lottery factor: 0

Links

Installation

Readme

text-zipper-monad

Hackage Build Status

text-zipper-monad provides a monadic interface to the text-zipper package.

Usage

import Data.Text.Zipper
import qualified Data.Text.Zipper.Edit as Z

insertXAtTheBeginning = do
  Z.moveCursor (0, 0)
  Z.insertChar 'x'

main = do
  let tz = stringZipper ["abc", "def"] Nothing
      newTz = Z.execEdit insertXAtTheBeginning tz
  putStrLn (unlines (getText newTz))