diff options
Diffstat (limited to 'src/Hack/Buffer')
-rw-r--r-- | src/Hack/Buffer/Extra.hs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/Hack/Buffer/Extra.hs b/src/Hack/Buffer/Extra.hs new file mode 100644 index 0000000..999703c --- /dev/null +++ b/src/Hack/Buffer/Extra.hs @@ -0,0 +1,10 @@ +module Hack.Buffer.Extra where + +import Hack.Buffer (Buffer) + + +length :: Buffer -> Int +length (ls, rs) = Prelude.length ls + Prelude.length rs + +insertChar :: Char -> Buffer -> Buffer +insertChar c (ls, rs) = (ls <> [c], rs) |