-
-
Save shhyou/2aab7d38905196442aa1 to your computer and use it in GitHub Desktop.
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
-- released under CC0 by favonia | |
import System.Environment | |
fix f = let lfp = f lfp in lfp | |
quotes :: [String -> String] | |
quotes = map q $ cycle [("「", "」"), ("『", "』")] | |
where q (l,r) str = l ++ str ++ r | |
warn :: (String -> String) -> String -> String | |
warn q str = concat ["分享", q str, "難判定有無違法,盡量不要分享", q str, ",以免觸法。"] | |
seed :: String | |
seed = "不能宣傳 2/14 罷免蔡正元" | |
gen :: Int -> String | |
gen n = take n $ fix (\f -> warn (head quotes . f)) seed | |
main = do | |
[n] <- getArgs | |
putStrLn $ gen (read n) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment