logoalt Hacker News

sshine11/11/20241 replyview on HN

Since the original sed command took "Haskell" as standard input, why not:

  {-# LANGUAGE OverloadedStrings #-}

  import qualified Data.Text as T
  import qualified Data.Text.IO as T

  main :: IO ()
  main = T.interact (T.replace "k" "sk" . T.replace "ke" "-ki")

Replies

itishappy11/11/2024

Didn't think to, but that looks very slick!