This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE OverloadedStrings #-} | |
import Data.Conduit | |
import Data.Conduit.Network | |
import Data.Conduit.Text (encode, decode, utf8) | |
import qualified Data.Conduit.List as CL | |
import qualified Data.Conduit.Binary as CB | |
import Data.Text (toUpper) | |
import qualified Data.ByteString.Char8 as S8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Main where | |
import Data.Bits | |
{- Note that, once completely reduced according to the rules, | |
- the string will be homogeneous. If it did contain two different | |
- characters, there would be a place where two touched, and | |
- they could be reduced. | |
- | |
- In fact, the order in which the reductions are done doesn't really matter, |