{"categories":["algorithm","haskell"],"provider_url":"https://hatena.blog","version":"1.0","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Froki.hateblo.jp%2Fentry%2F2018%2F01%2F26%2Fmaximal_length_sequence\" title=\"maximal length sequence - Roki\u306e\u30c1\u30e9\u88cf\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","height":"190","url":"https://roki.hateblo.jp/entry/2018/01/26/maximal_length_sequence","author_url":"https://blog.hatena.ne.jp/Rok1/","blog_title":"Roki\u306e\u30c1\u30e9\u88cf","published":"2018-01-27 01:30:00","author_name":"Rok1","image_url":"http://chart.apis.google.com/chart?cht=tx&chl=%20%5Cbigoplus","provider_name":"Hatena Blog","type":"rich","blog_url":"https://roki.hateblo.jp/","width":"100%","description":"M\u7cfb\u5217\u306b\u95a2\u3059\u308b\u5b66\u7fd2\u30e1\u30e2*1\u3002 import Test.HUnit import System.IO mulcon :: Int -> Int mulcon 0 = 1 mulcon n = (a * mulcon(n - 1) + b) `mod` m where a = 3 b = 0 m = 7 mc :: [Int] -> [Int] mc = map mulcon main :: IO (Counts, Int) main = runTestText (putTextToHandle stderr False) tests where x = mc [0 .. 11] tests = \u2026","title":"maximal length sequence"}