$ echo "Haskell" | sed 's/ke/-ki'
Has-kill
$
Has-kill
$
Has-skill
$
{-# LANGUAGE OverloadedStrings #-}
import Prelude hiding (putStrLn)
import Data.Text (Text, replace)
import Data.Text.IO (putStrLn)
transform :: Text -> Text
transform = replace "k" "sk" . replace "ke" "-ki"
main :: IO ()
main = putStrLn $ transform "Haskell"What is the reason for hiding the putStrLn of Prelude and importing that of Data.Text.IO?
{-# 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") sed: -e expression #1, char 5: unterminated `s' command
It's like this: sed 's/find/replace/'Seems like many of them have nothing better to do, probably because of layoffs and statistics and linear algebra and 'predicting the next token' (hee hee) in the input, based on gigantic corpuses of data, masquerading as "AI", and many of those bros were/are worthless anyway.